summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-30 15:40:43 +0800
committerDavid S. Miller <davem@davemloft.net>2013-12-31 16:48:31 -0500
commit61d23e9f3d60347dd05475b35a7837f4e7fcbd7a (patch)
tree62368990bbfb46b2971156bc4fc764e11782f0c3 /drivers
parent9130ac61a5a909f6e463a18abafa99d4a2b5842f (diff)
downloadlinux-61d23e9f3d60347dd05475b35a7837f4e7fcbd7a.tar.bz2
net: benet: slight optimization of addr compare
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> 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/emulex/benet/be_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index f67586a766d2..b5c238aa6861 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -287,7 +287,7 @@ static int be_mac_addr_set(struct net_device *netdev, void *p)
/* The MAC change did not happen, either due to lack of privilege
* or PF didn't pre-provision.
*/
- if (memcmp(addr->sa_data, mac, ETH_ALEN)) {
+ if (!ether_addr_equal(addr->sa_data, mac)) {
status = -EPERM;
goto err;
}