Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: fddi: 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>

authored by

dingtianhong and committed by
David S. Miller
7c3c299d d9f394fe

+2 -1
+2 -1
drivers/net/fddi/skfp/fplustm.c
··· 23 23 #include "h/smc.h" 24 24 #include "h/supern_2.h" 25 25 #include <linux/bitrev.h> 26 + #include <linux/etherdevice.h> 26 27 27 28 #ifndef lint 28 29 static const char ID_sccs[] = "@(#)fplustm.c 1.32 99/02/23 (C) SK " ; ··· 1083 1082 slot = tb ; 1084 1083 continue ; 1085 1084 } 1086 - if (memcmp((char *)&tb->a,(char *)own,6)) 1085 + if (!ether_addr_equal((char *)&tb->a, (char *)own)) 1087 1086 continue ; 1088 1087 return tb; 1089 1088 }