summaryrefslogtreecommitdiff
path: root/include/linux/etherdevice.h
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-05-14 16:41:02 -0700
committerColin Cross <ccross@android.com>2012-05-14 16:41:02 -0700
commitec0b571c19ac62ab0bb80d373a3d4922a48b4b75 (patch)
tree10c597f5227c969c3f2b909fbeb29725a0c5c6e8 /include/linux/etherdevice.h
parent7bb8b65407a519d3a90dd8cecdd1ccd10ee0c6cc (diff)
parent36be50515fe2aef61533b516fa2576a2c7fe7664 (diff)
Merge commit 'v3.4-rc7' into android-3.4
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r--include/linux/etherdevice.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 8a1835855fa..fe5136d8145 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -159,7 +159,8 @@ static inline void eth_hw_addr_random(struct net_device *dev)
* @addr1: Pointer to a six-byte array containing the Ethernet address
* @addr2: Pointer other six-byte array containing the Ethernet address
*
- * Compare two ethernet addresses, returns 0 if equal
+ * Compare two ethernet addresses, returns 0 if equal, non-zero otherwise.
+ * Unlike memcmp(), it doesn't return a value suitable for sorting.
*/
static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
{
@@ -184,10 +185,10 @@ static inline unsigned long zap_last_2bytes(unsigned long value)
* @addr1: Pointer to an array of 8 bytes
* @addr2: Pointer to an other array of 8 bytes
*
- * Compare two ethernet addresses, returns 0 if equal.
- * Same result than "memcmp(addr1, addr2, ETH_ALEN)" but without conditional
- * branches, and possibly long word memory accesses on CPU allowing cheap
- * unaligned memory reads.
+ * Compare two ethernet addresses, returns 0 if equal, non-zero otherwise.
+ * Unlike memcmp(), it doesn't return a value suitable for sorting.
+ * The function doesn't need any conditional branches and possibly uses
+ * word memory accesses on CPU allowing cheap unaligned memory reads.
* arrays = { byte1, byte2, byte3, byte4, byte6, byte7, pad1, pad2}
*
* Please note that alignment of addr1 & addr2 is only guaranted to be 16 bits.