]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
stmmac: dwmac-loongson: change loongson_dwmac_driver from global to static
authorTom Rix <trix@redhat.com>
Sun, 3 Apr 2022 14:02:02 +0000 (10:02 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Apr 2022 11:47:54 +0000 (12:47 +0100)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c

index ecf759ee1c9f5e21e2519c416e3d1323cdc0e474..017dbbda0c1c45a9b19e01214dda57beb60a3de0 100644 (file)
@@ -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,