Skip to content

Commit ae9f38a

Browse files
Tom Rixjonmason
authored andcommitted
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: ff32fac ("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>
1 parent 8e4bfbe commit ae9f38a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ static u32 pci_space[] = {
978978
0, /*Max Lat, Min Gnt, interrupt pin, interrupt line*/
979979
};
980980

981-
int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
981+
static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val)
982982
{
983983
if (devfn == 0) {
984984
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 *
987987
return PCIBIOS_DEVICE_NOT_FOUND;
988988
}
989989

990-
int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
990+
static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val)
991991
{
992992
return 0;
993993
}
994994

995-
struct pci_ops vpci_ops = {
995+
static struct pci_ops vpci_ops = {
996996
.read = pci_read,
997997
.write = pci_write,
998998
};

0 commit comments

Comments
 (0)