Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: cpcihp: Declare cpci_debug in header file

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/20210701184306.1492003-1-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Krzysztof Wilczyński and committed by
Bjorn Helgaas
6d71cc4c a97396c6

+3 -2
+3
drivers/pci/hotplug/cpci_hotplug.h
··· 75 75 int cpci_hp_start(void); 76 76 int cpci_hp_stop(void); 77 77 78 + /* Global variables */ 79 + extern int cpci_debug; 80 + 78 81 /* 79 82 * Internal function prototypes, these functions should not be used by 80 83 * board/chassis drivers.
-2
drivers/pci/hotplug/cpci_hotplug_pci.c
··· 19 19 20 20 #define MY_NAME "cpci_hotplug" 21 21 22 - extern int cpci_debug; 23 - 24 22 #define dbg(format, arg...) \ 25 23 do { \ 26 24 if (cpci_debug) \