diff mbox series

[net-next,v2] net: ethernet: mtk_eth_soc: use be32 type to store be32 values

Message ID 20230401-mtk_eth_soc-sparse-v2-1-963becba3cb7@kernel.org (mailing list archive)
State Accepted
Commit 9bc11460bea751b5c805ac793de35a55629adb9b
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] net: ethernet: mtk_eth_soc: use be32 type to store be32 values | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 20 this patch: 19
netdev/cc_maintainers success CCed 14 of 14 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 20 this patch: 19
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Simon Horman April 7, 2023, 1:26 p.m. UTC
n_addr is used to store be32 values,
so a sparse-friendly array of be32 to store these values.

Flagged by sparse:
  .../mtk_ppe_debugfs.c:59:27: warning: incorrect type in assignment (different base types)
  .../mtk_ppe_debugfs.c:59:27:    expected unsigned int
  .../mtk_ppe_debugfs.c:59:27:    got restricted __be32 [usertype]
  .../mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16

No functional changes intended.
Compile tested only.

Signed-off-by: Simon Horman <horms@kernel.org>
---
Changes in v2:
- Drop change to make use of the cpu_to_be32_array helper.
  It was suggested that a new helper is in order.
  Let's leave that as a follow-up.
- Link to v1: https://lore.kernel.org/r/20230401-mtk_eth_soc-sparse-v1-1-84e9fc7b8eab@kernel.org
---
 drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 11, 2023, 1:40 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 07 Apr 2023 15:26:51 +0200 you wrote:
> n_addr is used to store be32 values,
> so a sparse-friendly array of be32 to store these values.
> 
> Flagged by sparse:
>   .../mtk_ppe_debugfs.c:59:27: warning: incorrect type in assignment (different base types)
>   .../mtk_ppe_debugfs.c:59:27:    expected unsigned int
>   .../mtk_ppe_debugfs.c:59:27:    got restricted __be32 [usertype]
>   .../mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: ethernet: mtk_eth_soc: use be32 type to store be32 values
    https://git.kernel.org/netdev/net-next/c/9bc11460bea7

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
index 53cf87e9acbb..316fe2e70fea 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
@@ -47,7 +47,7 @@  static const char *mtk_foe_pkt_type_str(int type)
 static void
 mtk_print_addr(struct seq_file *m, u32 *addr, bool ipv6)
 {
-	u32 n_addr[4];
+	__be32 n_addr[4];
 	int i;
 
 	if (!ipv6) {