mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
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>
This commit is contained in:
parent
9130ac61a5
commit
61d23e9f3d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue