projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30300d9
)
net: stmmac: xgmac: Fix RSS not writing all Keys to HW
author
Jose Abreu
<
[email protected]
>
Mon, 30 Sep 2019 08:19:12 +0000
(10:19 +0200)
committer
David S. Miller
<
[email protected]
>
Tue, 1 Oct 2019 17:12:38 +0000
(10:12 -0700)
The sizeof(cfg->key) is != ARRAY_SIZE(cfg->key). Fix it. This warning is
triggered when running with cc flag -Wsizeof-array-div.
Reported-by: kbuild test robot <
[email protected]
>
Reported-by: Nick Desaulniers <
[email protected]
>
Reported-by: Nathan Chancellor <
[email protected]
>
Fixes: 76067459c686 ("net: stmmac: Implement RSS and enable it in XGMAC core")
Reviewed-by: Nick Desaulniers <
[email protected]
>
Signed-off-by: Jose Abreu <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
index 6d8ac2ef4fc2a491a3dfcf3c53d6a9f6fd2775c0..4a1f52474dbc0e440411fe5b6567a112e96abde5 100644
(file)
--- a/
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
+++ b/
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
@@
-533,7
+533,7
@@
static int dwxgmac2_rss_configure(struct mac_device_info *hw,
return 0;
}
- for (i = 0; i < (
sizeof
(cfg->key) / sizeof(u32)); i++) {
+ for (i = 0; i < (
ARRAY_SIZE
(cfg->key) / sizeof(u32)); i++) {
ret = dwxgmac2_rss_write_reg(ioaddr, true, i, cfg->key[i]);
if (ret)
return ret;