diff options
author | Tom Rix <trix@redhat.com> | 2022-07-04 15:25:59 +0200 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2022-08-09 23:54:43 +0200 |
commit | ae9f38adac261e4ca83559c7df21b18dd66aa986 (patch) | |
tree | 14de724977fa4a3e25e8ad561e3dc01beb7fdca8 /drivers | |
parent | PCI: endpoint: pci-epf-vntb: fix error handle in epf_ntb_mw_bar_init() (diff) | |
download | linux-ae9f38adac261e4ca83559c7df21b18dd66aa986.tar.xz linux-ae9f38adac261e4ca83559c7df21b18dd66aa986.zip |
PCI: endpoint: pci-epf-vntb: reduce several globals to statics
sparse reports
drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: symbol 'pci_read' was not declared. Should it be static?
drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: symbol 'pci_write' was not declared. Should it be static?
drivers/pci/endpoint/functions/pci-epf-vntb.c:989:16: warning: symbol 'vpci_ops' was not declared. Should it be static?
These functions and variables are only used in pci-epf-vntb.c, so their storage
class specifiers should be static.
Fixes: ff32fac00d97 ("NTB: EPF: support NTB transfer between PCI RC and EP connection")
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/endpoint/functions/pci-epf-vntb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c index b069c84ec172..2aee789a370c 100644 --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c @@ -978,7 +978,7 @@ static u32 pci_space[] = { 0, /*Max Lat, Min Gnt, interrupt pin, interrupt line*/ }; -int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) +static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) { if (devfn == 0) { memcpy(val, ((u8 *)pci_space) + where, size); @@ -987,12 +987,12 @@ int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * return PCIBIOS_DEVICE_NOT_FOUND; } -int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) +static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { return 0; } -struct pci_ops vpci_ops = { +static struct pci_ops vpci_ops = { .read = pci_read, .write = pci_write, }; |