net: benet: slight optimization of addr compare
Subsystems (3)
PATCH v3 5/19 net: benet: slight optimization of addr compare
Use possibly more efficient ether_addr_equal to instead of memcmp.
Cc Sathya Perla <[email protected]>
Cc Subbu Seetharaman <[email protected]>
Cc Ajit Khaparde <[email protected]>
Signed-off-by Ding Tianhong <[email protected]>
--- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/emulex/benet/be_main.c +1 -1
@@ -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; }
Signature · 1 line
1.8.0