projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00fa4ce
)
net: ti: slight optimization of addr compare
author
dingtianhong
<dingtianhong@huawei.com>
Mon, 30 Dec 2013 07:41:27 +0000
(15:41 +0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 31 Dec 2013 21:48:33 +0000
(16:48 -0500)
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/ti/cpsw_ale.c
b/drivers/net/ethernet/ti/cpsw_ale.c
index
7fa60d6
..
63e9819
100644
(file)
--- a/
drivers/net/ethernet/ti/cpsw_ale.c
+++ b/
drivers/net/ethernet/ti/cpsw_ale.c
@@
-163,7
+163,7
@@
int cpsw_ale_match_addr(struct cpsw_ale *ale, u8 *addr, u16 vid)
if (cpsw_ale_get_vlan_id(ale_entry) != vid)
continue;
cpsw_ale_get_addr(ale_entry, entry_addr);
- if (
memcmp(entry_addr, addr, 6) == 0
)
+ if (
ether_addr_equal(entry_addr, addr)
)
return idx;
}
return -ENOENT;