PCI: rpadlpar: Make some functions static
PATCH 1/1 PCI: rpadlpar: Make some functions static
The sparse tool report build warnings as follows:
drivers/pci/hotplug/rpadlpar_core.c:355:5: warning:
symbol 'dlpar_remove_pci_slot' was not declared. Should it be static?drivers/pci/hotplug/rpadlpar_core.c:461:12: warning:
symbol 'rpadlpar_io_init' was not declared. Should it be static?drivers/pci/hotplug/rpadlpar_core.c:473:6: warning:
symbol 'rpadlpar_io_exit' was not declared. Should it be static?
Those functions are not used outside of this file, so marks them static.
Also mark rpadlpar_io_exit() as __exit.
--- drivers/pci/hotplug/rpadlpar_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/hotplug/rpadlpar_core.c +3 -3
@@ -352,7 +352,7 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn)* -ENODEV Not a valid drc_name * -EIO Internal PCI Error */ -int dlpar_remove_pci_slot (char *drc_name,struct device_node *dn) +static int dlpar_remove_pci_slot (char *drc_name,struct device_node *dn) {struct pci_bus *bus;struct slot *slot;
@@ -458,7 +458,7 @@ static inline int is_dlpar_capable(void)return (int ) (rc !=RTAS_UNKNOWN_SERVICE ); } -int __init rpadlpar_io_init (void ) +static int __init rpadlpar_io_init (void ) {if (!is_dlpar_capable ()) {
@@ -470,7 +470,7 @@ int __init rpadlpar_io_init(void)return dlpar_sysfs_init (); } -void rpadlpar_io_exit (void ) +static void __exit rpadlpar_io_exit(void) {dlpar_sysfs_exit (); }
Bjorn Helgaas
AppliedQuoted 9 lines · Wei Yongjun
The sparse tool report build warnings as follows:
drivers/pci/hotplug/rpadlpar_core.c:355:5: warning:
symbol 'dlpar_remove_pci_slot' was not declared. Should it be static?drivers/pci/hotplug/rpadlpar_core.c:461:12: warning:
symbol 'rpadlpar_io_init' was not declared. Should it be static?drivers/pci/hotplug/rpadlpar_core.c:473:6: warning:
symbol 'rpadlpar_io_exit' was not declared. Should it be static?
Quoted 6 lines
Those functions are not used outside of this file, so marks them static.
Also markrpadlpar_io_exit()as__exit.Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Applied to pci/hotplug for v5.9, thanks!
Quoted 36 lines
--- drivers/pci/hotplug/rpadlpar_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/pci/hotplug/rpadlpar_core.c +3
-3@@ -352,7 +352,7 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn)* -ENODEV Not a valid drc_name * -EIO Internal PCI Error */ -int dlpar_remove_pci_slot (char *drc_name,struct device_node *dn) +static int dlpar_remove_pci_slot (char *drc_name,struct device_node *dn) {struct pci_bus *bus;struct slot *slot;@@ -458,7 +458,7 @@ static inline int is_dlpar_capable(void)return (int ) (rc !=RTAS_UNKNOWN_SERVICE ); } -int __init rpadlpar_io_init (void ) +static int __init rpadlpar_io_init (void ) {if (!is_dlpar_capable ()) {@@ -470,7 +470,7 @@ int __init rpadlpar_io_init(void)return dlpar_sysfs_init (); } -void rpadlpar_io_exit (void ) +static void __exit rpadlpar_io_exit(void) {dlpar_sysfs_exit (); }