Message ID | 1623034629-30384-1-git-send-email-zou_wei@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3f07ce8e528746d477cfb301f4dc7b197ad1e2a3 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] net: dsa: hellcreek: Use is_zero_ether_addr() instead of memcmp() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 15 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Mon Jun 07 2021, Zou Wei wrote: > Using is_zero_ether_addr() instead of directly use > memcmp() to determine if the ethernet address is all > zeros. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zou Wei <zou_wei@huawei.com> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 7 Jun 2021 10:57:09 +0800 you wrote: > Using is_zero_ether_addr() instead of directly use > memcmp() to determine if the ethernet address is all > zeros. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zou Wei <zou_wei@huawei.com> > > [...] 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
diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c index 4d78219..9fdcc4b 100644 --- a/drivers/net/dsa/hirschmann/hellcreek.c +++ b/drivers/net/dsa/hirschmann/hellcreek.c @@ -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 */
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> --- drivers/net/dsa/hirschmann/hellcreek.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)