diff options
| author | dingtianhong <dingtianhong@huawei.com> | 2013-12-30 02:41:27 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-12-31 16:48:33 -0500 |
| commit | d9f394fe56eacde32c32fe3039214bdd677b792c (patch) | |
| tree | 7bad7a353ba209cd477aeaa089f21d8103041ce8 /drivers | |
| parent | 00fa4ce9fde7372f033133ada9cf166837ca7479 (diff) | |
net: ti: slight optimization of addr compare
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ethernet/ti/cpsw_ale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 7fa60d6092ed..63e981975059 100644 --- 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) | |||
| 163 | if (cpsw_ale_get_vlan_id(ale_entry) != vid) | 163 | if (cpsw_ale_get_vlan_id(ale_entry) != vid) |
| 164 | continue; | 164 | continue; |
| 165 | cpsw_ale_get_addr(ale_entry, entry_addr); | 165 | cpsw_ale_get_addr(ale_entry, entry_addr); |
| 166 | if (memcmp(entry_addr, addr, 6) == 0) | 166 | if (ether_addr_equal(entry_addr, addr)) |
| 167 | return idx; | 167 | return idx; |
| 168 | } | 168 | } |
| 169 | return -ENOENT; | 169 | return -ENOENT; |
