net: dsa: hellcreek: Use is_zero_ether_addr() instead of memcmp()
PATCH 1/1 net: dsa: hellcreek: Use is_zero_ether_addr() instead of memcmp()
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zou Wei <[email protected]>
--- drivers/net/dsa/hirschmann/hellcreek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/dsa/hirschmann/hellcreek.c +1 -2
@@ -927,7 +927,6 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,/* Read table */ for (i =0 ; i < hellcreek->fdb_entries; ++i) { -unsigned char null_addr[ETH_ALEN ] = {0 };struct hellcreek_fdb_entry entry = {0 };/* Read entry */
@@ -937,7 +936,7 @@ static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,hellcreek_write (hellcreek,0x00 ,HR_FDBRDH );/* Check valid */ -if (!memcmp (entry.mac, null_addr,ETH_ALEN )) +if (is_zero_ether_addr (entry.mac))continue ;/* Check port mask */
Signature · 1 line
2.6.2
Quoted 6 lines · Zou Wei
Using
is_zero_ether_addr()instead of directly usememcmp()to determine if the ethernet address is all zeros.Reported-by Hulk Robot <[email protected]>Signed-off-by Zou Wei <[email protected]>
Reviewed-by Kurt Kanzenbach <[email protected]>
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Mon, 7 Jun 2021 10:57:09 +0800 you wrote:
Using
is_zero_ether_addr()instead of directly usememcmp()to determine if the ethernet address is all zeros.Reported-by Hulk Robot <[email protected]>Signed-off-by Zou Wei <[email protected]>[...]
Here is the summary with links:
- [-next] net: dsa: hellcreek: Use is_zero_ether_addr() instead of memcmp()
https://git.kernel.org/netdev/net-next/c/3f07ce8e5287
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html