Skip to contentSkip to conversation

net: dsa: microchip: fix Clang -Wunused-const-variable warning on 'ksz_dt_ids'

PATCH Applied Arun Ramadoss 3 participants 3 messages Jul 15, 2022 – Jul 18, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: microchip: fix Clang -Wunused-const-variable warning on 'ksz_dt_ids'

This patch removes the of_match_ptr() pointer when dereferencing the ksz_dt_ids which produce the unused variable warning.

---
 drivers/net/dsa/microchip/ksz_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/microchip/ksz_spi.c +1 -1
index 4844830dca72..05bd089795f8 100644
@@ -215,7 +215,7 @@ static struct spi_driver ksz_spi_driver = {
 	.driver = {
 		.name	= "ksz-switch",
 		.owner	= THIS_MODULE,
-		.of_match_table = of_match_ptr(ksz_dt_ids),
+		.of_match_table = ksz_dt_ids,
 	},
 	.id_table = ksz_spi_ids,
 	.probe	= ksz_spi_probe,

base-commit: 6e6fbb72e48ba3da229ff2158cf0d26aa50a218a

Signature · 1 line
2.36.1
#2 lore raw
In reply to Arun Ramadoss
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 8 lines · On Fri, 15 Jul 2022 11:03:34 +0530 you wrote:

This patch removes the of_match_ptr() pointer when dereferencing the ksz_dt_ids which produce the unused variable warning.

[...]

Here is the summary with links:
- [net-next] net: dsa: microchip: fix Clang -Wunused-const-variable warning on 'ksz_dt_ids'

    https://git.kernel.org/netdev/net-next/c/da53af8cb932

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html