Skip to content

Commit

Permalink
net: dsa: qca8k: fix noderef.cocci warnings
Browse files Browse the repository at this point in the history
drivers/net/dsa/qca8k.c:422:37-43: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Fixes: 9038622 ("net: dsa: qca8k: add support for larger read/write size with mgmt Ethernet")
CC: Ansuel Smith <ansuelsmth@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220209221304.GA17529@d2214a582157
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kernel test robot authored and Jakub Kicinski committed Feb 10, 2022
1 parent d8c2858 commit 4f5e483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/qca8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
u16 r1, r2, page;
int ret;

if (!qca8k_read_eth(priv, reg, val, sizeof(val)))
if (!qca8k_read_eth(priv, reg, val, sizeof(*val)))
return 0;

qca8k_split_addr(reg, &r1, &r2, &page);
Expand Down

0 comments on commit 4f5e483

Please sign in to comment.