diff mbox series

[v2] PCI: Move static keyword to the front of declarations in pci-bridge-emul.c

Message ID 20190828131733.5817-1-kw@linux.com (mailing list archive)
State Mainlined, archived
Commit 8050f3f6645ae0f7e4c1304593f6f7eb2ee7d85c
Delegated to: Lorenzo Pieralisi
Headers show
Series [v2] PCI: Move static keyword to the front of declarations in pci-bridge-emul.c | expand

Commit Message

Krzysztof Wilczyński Aug. 28, 2019, 1:17 p.m. UTC
Move the static keyword to the front of declarations of
pci_regs_behavior and pcie_cap_regs_behavior, and resolve
the following compiler warning that can be seen when
building with warnings enabled (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[] = {
 ^

Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
Changes in v2:
  Update commit message to include compiler warning.

 drivers/pci/pci-bridge-emul.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Aug. 28, 2019, 1:39 p.m. UTC | #1
Hello,

On Wed, 28 Aug 2019 15:17:33 +0200
Krzysztof Wilczynski <kw@linux.com> wrote:

> Move the static keyword to the front of declarations of
> pci_regs_behavior and pcie_cap_regs_behavior, and resolve
> the following compiler warning that can be seen when
> building with warnings enabled (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[] = {
>  ^
> 
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>

Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Thomas
diff mbox series

Patch

diff --git a/drivers/pci/pci-bridge-emul.c b/drivers/pci/pci-bridge-emul.c
index 06083b86d4f4..5fd90105510d 100644
--- a/drivers/pci/pci-bridge-emul.c
+++ b/drivers/pci/pci-bridge-emul.c
@@ -38,7 +38,7 @@  struct pci_bridge_reg_behavior {
 	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_COMMAND / 4] = {
 		.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] = {
 		/*
 		 * Capability ID, Next Capability Pointer and