Skip to content

Commit 2e4770a

Browse files
Wei Yongjunbjorn-helgaas
authored andcommitted
PCI: rpadlpar: Make 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 mark them static. Also mark rpadlpar_io_exit() as __exit. Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 8a94644 commit 2e4770a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pci/hotplug/rpadlpar_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn)
352352
* -ENODEV Not a valid drc_name
353353
* -EIO Internal PCI Error
354354
*/
355-
int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
355+
static int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
356356
{
357357
struct pci_bus *bus;
358358
struct slot *slot;
@@ -458,7 +458,7 @@ static inline int is_dlpar_capable(void)
458458
return (int) (rc != RTAS_UNKNOWN_SERVICE);
459459
}
460460

461-
int __init rpadlpar_io_init(void)
461+
static int __init rpadlpar_io_init(void)
462462
{
463463

464464
if (!is_dlpar_capable()) {
@@ -470,7 +470,7 @@ int __init rpadlpar_io_init(void)
470470
return dlpar_sysfs_init();
471471
}
472472

473-
void rpadlpar_io_exit(void)
473+
static void __exit rpadlpar_io_exit(void)
474474
{
475475
dlpar_sysfs_exit();
476476
}

0 commit comments

Comments
 (0)