diff mbox

[2/3] PCI: mvebu: make local functions static

Message ID 000401ceaf9b$9132cba0$b39862e0$%han@samsung.com
State Superseded
Headers show

Commit Message

Jingoo Han Sept. 12, 2013, 9:36 a.m. UTC
mvebu_pcie_add_bus(), mvebu_pcie_align_resource()  are used only
in this file. Thus, these local functions should be staticized
in order to fix the following sparse warnings:

drivers/pci/host/pci-mvebu.c:684:6: warning: symbol 'mvebu_pcie_add_bus' was not declared. Should it be static?
drivers/pci/host/pci-mvebu.c:690:17: warning: symbol 'mvebu_pcie_align_resource' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/pci/host/pci-mvebu.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Thomas Petazzoni Sept. 12, 2013, 9:37 a.m. UTC | #1
Dear Jingoo Han,

On Thu, 12 Sep 2013 18:36:33 +0900, Jingoo Han wrote:
> mvebu_pcie_add_bus(), mvebu_pcie_align_resource()  are used only
> in this file. Thus, these local functions should be staticized
> in order to fix the following sparse warnings:
> 
> drivers/pci/host/pci-mvebu.c:684:6: warning: symbol
> 'mvebu_pcie_add_bus' was not declared. Should it be static?
> drivers/pci/host/pci-mvebu.c:690:17: warning: symbol
> 'mvebu_pcie_align_resource' was not declared. Should it be static?
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
diff mbox

Patch

diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index d66530e..b54ceb1 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -681,17 +681,17 @@  static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys)
 	return bus;
 }
 
-void mvebu_pcie_add_bus(struct pci_bus *bus)
+static void mvebu_pcie_add_bus(struct pci_bus *bus)
 {
 	struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
 	bus->msi = pcie->msi;
 }
 
-resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
-					  const struct resource *res,
-					  resource_size_t start,
-					  resource_size_t size,
-					  resource_size_t align)
+static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
+						const struct resource *res,
+						resource_size_t start,
+						resource_size_t size,
+						resource_size_t align)
 {
 	if (dev->bus->number != 0)
 		return start;