mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
7ace30aeb6
Backport upstream code split patch for qca8k needed for ipq40xx target to correctly implement a DSA driver. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 4f5e483b8c7a644733db941a1ae00173baa7b463 Mon Sep 17 00:00:00 2001
|
|
From: kernel test robot <lkp@intel.com>
|
|
Date: Thu, 10 Feb 2022 06:13:04 +0800
|
|
Subject: [PATCH 1/1] net: dsa: qca8k: fix noderef.cocci warnings
|
|
|
|
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: 90386223f44e ("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>
|
|
---
|
|
drivers/net/dsa/qca8k.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/dsa/qca8k.c
|
|
+++ b/drivers/net/dsa/qca8k.c
|
|
@@ -456,7 +456,7 @@ qca8k_regmap_read(void *ctx, uint32_t re
|
|
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);
|