Skip to content

Commit

Permalink
PCI: cpcihp: Declare cpci_debug in header file
Browse files Browse the repository at this point in the history
cpci_debug is declared as a global variable in cpci_hotplug_core.c and used
in cpci_hotplug_pci.c via an "extern".  Add an extern declaration in the
header file.

Resolves the following sparse warning:

  drivers/pci/hotplug/cpci_hotplug_core.c:47:5: warning: symbol 'cpci_debug' was not declared. Should it be static?

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
  • Loading branch information
kwilczynski authored and bjorn-helgaas committed Jul 1, 2021
1 parent a97396c commit 6d71cc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions drivers/pci/hotplug/cpci_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ int cpci_hp_unregister_bus(struct pci_bus *bus);
int cpci_hp_start(void);
int cpci_hp_stop(void);

/* Global variables */
extern int cpci_debug;

/*
* Internal function prototypes, these functions should not be used by
* board/chassis drivers.
Expand Down
2 changes: 0 additions & 2 deletions drivers/pci/hotplug/cpci_hotplug_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#define MY_NAME "cpci_hotplug"

extern int cpci_debug;

#define dbg(format, arg...) \
do { \
if (cpci_debug) \
Expand Down

0 comments on commit 6d71cc4

Please sign in to comment.