stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
Subsystems (4)
PATCH 1/1 stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
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.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +1 -1
@@ -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,
Signature · 1 line
2.27.0
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 11 lines · 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_driveris only used indwmac-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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html