mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
PCI: Use static const struct, not const static struct
[ Upstream commit 8050f3f664 ]
Move the static keyword to the front of declarations of pci_regs_behavior[]
and pcie_cap_regs_behavior[], which resolves compiler warnings when
building with "W=1":
drivers/pci/pci-bridge-emul.c:41:1: warning: ‘static’ is not at beginning of
declaration [-Wold-style-declaration]
const static struct pci_bridge_reg_behavior pci_regs_behavior[] = {
^
drivers/pci/pci-bridge-emul.c:176:1: warning: ‘static’ is not at beginning of
declaration [-Wold-style-declaration]
const static struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {
^
Link: https://lore.kernel.org/r/20190826151436.4672-1-kw@linux.com
Link: https://lore.kernel.org/r/20190828131733.5817-1-kw@linux.com
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
397a607551
commit
e14f686548
@@ -38,7 +38,7 @@ struct pci_bridge_reg_behavior {
|
|||||||
u32 rsvd;
|
u32 rsvd;
|
||||||
};
|
};
|
||||||
|
|
||||||
const static struct pci_bridge_reg_behavior pci_regs_behavior[] = {
|
static const struct pci_bridge_reg_behavior pci_regs_behavior[] = {
|
||||||
[PCI_VENDOR_ID / 4] = { .ro = ~0 },
|
[PCI_VENDOR_ID / 4] = { .ro = ~0 },
|
||||||
[PCI_COMMAND / 4] = {
|
[PCI_COMMAND / 4] = {
|
||||||
.rw = (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
|
.rw = (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
|
||||||
@@ -173,7 +173,7 @@ const static struct pci_bridge_reg_behavior pci_regs_behavior[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const static struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {
|
static const struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {
|
||||||
[PCI_CAP_LIST_ID / 4] = {
|
[PCI_CAP_LIST_ID / 4] = {
|
||||||
/*
|
/*
|
||||||
* Capability ID, Next Capability Pointer and
|
* Capability ID, Next Capability Pointer and
|
||||||
|
|||||||
Reference in New Issue
Block a user