diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-30 15:41:17 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 16:48:32 -0500 |
commit | c4bde29cb0f3a520e3dd666e523f9a576a47a47a (patch) | |
tree | b890f260d2fda6e3f4936a23eb58262c4de267f0 /drivers/net/ethernet/renesas | |
parent | 6878f79a8b71e8c7b0587a1185584f54fd31f185 (diff) | |
download | blackbird-op-linux-c4bde29cb0f3a520e3dd666e523f9a576a47a47a.tar.gz blackbird-op-linux-c4bde29cb0f3a520e3dd666e523f9a576a47a47a.zip |
net: renesas: 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/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index ca742e1f704e..2d00bce7d004 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2207,7 +2207,7 @@ static int sh_eth_tsu_find_entry(struct net_device *ndev, const u8 *addr) for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) { sh_eth_tsu_read_entry(reg_offset, c_addr); - if (memcmp(addr, c_addr, ETH_ALEN) == 0) + if (ether_addr_equal(addr, c_addr)) return i; } |