* [PATCH] stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
@ 2022-04-03 14:02 Tom Rix
2022-04-04 12:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2022-04-03 14:02 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba, pabeni,
mcoquelin.stm32
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Tom Rix
Smatch reports this issue
dwmac-loongson.c:208:19: warning: symbol
'loongson_dwmac_driver' was not declared.
Should it be static?
loongson_dwmac_driver is only used in dwmac-loongson.c.
File scope variables used only in one file should
be static. Change loongson_dwmac_driver's
storage-class-specifier from global to static.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index ecf759ee1c9f..017dbbda0c1c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -205,7 +205,7 @@ static const struct pci_device_id loongson_dwmac_id_table[] = {
};
MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);
-struct pci_driver loongson_dwmac_driver = {
+static struct pci_driver loongson_dwmac_driver = {
.name = "dwmac-loongson-pci",
.id_table = loongson_dwmac_id_table,
.probe = loongson_dwmac_probe,
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
2022-04-03 14:02 [PATCH] stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static Tom Rix
@ 2022-04-04 12:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-04 12:00 UTC (permalink / raw)
To: Tom Rix
Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba, pabeni,
mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Sun, 3 Apr 2022 10:02:02 -0400 you wrote:
> Smatch reports this issue
> dwmac-loongson.c:208:19: warning: symbol
> 'loongson_dwmac_driver' was not declared.
> Should it be static?
>
> loongson_dwmac_driver is only used in dwmac-loongson.c.
> File scope variables used only in one file should
> be static. Change loongson_dwmac_driver's
> storage-class-specifier from global to static.
>
> [...]
Here is the summary with links:
- stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
https://git.kernel.org/netdev/net/c/2baed4f9b085
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-04 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 14:02 [PATCH] stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static Tom Rix
2022-04-04 12:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).