Skip to contentSkip to conversation

PCI: dwc: designware: make dw_pcie_prog_*_atu_unroll() static

PATCH In review Carlos Palminha 4 participants 5 messages Jul 17, 2017 – Aug 3, 2017 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: dwc: designware: make dw_pcie_prog_*_atu_unroll() static

Helper functions dw_pcie_prog_*_atu_unroll don't need to be in global scope, so make it static.

Cleans up sparse warnings:
- symbol 'dw_pcie_prog_outbound_atu_unroll' was not declared. Should it be static?
- symbol 'dw_pcie_prog_inbound_atu_unroll' was not declared. Should it be static?

---
Patch made against linux-next tree, tag next-20170714

 drivers/pci/dwc/pcie-designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dwc/pcie-designware.c +2 -2
index 0e03af279259..48d6d0712ea8 100644
@@ -107,7 +107,7 @@ static void dw_pcie_writel_ob_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
+static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
 				      u64 cpu_addr, u64 pci_addr, u32 size)
 {
 	u32 retries, val;
@@ -200,7 +200,7 @@ static void dw_pcie_writel_ib_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
+static int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
 				    u64 cpu_addr, enum dw_pcie_as_type as_type)
 {
 	int type;

--
2.11.0

Acked-by on v1 1/1
#1 lore raw

Hi Carlos,

Às 2:13 PM de 7/17/2017, Carlos Palminha escreveu:

Quoted 37 lines

Helper functions dw_pcie_prog_*_atu_unroll don't need to be in global scope, so make it static.

Cleans up sparse warnings:
- symbol 'dw_pcie_prog_outbound_atu_unroll' was not declared. Should it be static?
- symbol 'dw_pcie_prog_inbound_atu_unroll' was not declared. Should it be static?

---
Patch made against linux-next tree, tag next-20170714

 drivers/pci/dwc/pcie-designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dwc/pcie-designware.c +2 -3
index 0e03af279259..48d6d0712ea8 100644
@@ -107,7 +107,7 @@ static void dw_pcie_writel_ob_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
+static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
 				      u64 cpu_addr, u64 pci_addr, u32 size)
 {
 	u32 retries, val;
@@ -200,7 +200,7 @@ static void dw_pcie_writel_ib_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
+static int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
 				    u64 cpu_addr, enum dw_pcie_as_type as_type)
 {
 	int type;
--
Quoted 2 lines

2.11.0

That indeed escaped in the refactoring :) Thanks!

Acked-by
#2 lore raw
Quoted 6 lines · Joao Pinto

=20
=20
Hi Carlos,
=20
=C3=80s 2:13 PM de 7/17/2017, Carlos Palminha escreveu:

Quoted 1 line

Helper functions dw_pcie_prog_*_atu_unroll don't need to be in =

global

Quoted 5 lines

scope,

Quoted 4 lines

so make it static.

Cleans up sparse warnings:
- symbol 'dw_pcie_prog_outbound_atu_unroll' was not declared. Should =

it

Quoted 2 lines

be static?

Quoted 1 line

- symbol 'dw_pcie_prog_inbound_atu_unroll' was not declared. Should =

it

Quoted 10 lines

be static?

=

Quoted 9 lines

---
Patch made against linux-next tree, tag next-20170714

 drivers/pci/dwc/pcie-designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
= renamed from drivers/pci/dwc/pcie-designware.c +0 -0

b/drivers/pci/dwc/pcie-

Quoted 5 lines

designware.c

drivers/pci/dwc/pcie-designware.c static void dw_pcie_writel_ob_unroll(struct =

Quoted 4 lines

index 0e03af279259..48d6d0712ea8 100644

drivers/pci/dwc/pcie-designware.c +0 -0
@@ -107,7 +107,7 @@ static void dw_pcie_writel_ob_unroll(struct =

dw_pcie

Quoted 5 lines

*pci, u32 index, u32 reg,

Quoted 4 lines
drivers/pci/dwc/pcie-designware.c +0 -1
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int =

index,

Quoted 2 lines

int type,

Quoted 1 line
drivers/pci/dwc/pcie-designware.c +1 -0
+static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, =

int

Quoted 5 lines

index, int type,

drivers/pci/dwc/pcie-designware.c static void dw_pcie_writel_ib_unroll(struct =

Quoted 4 lines
drivers/pci/dwc/pcie-designware.c +0 -0
 				      u64 cpu_addr, u64 pci_addr, u32 size)
 {
 	u32 retries, val;
@@ -200,7 +200,7 @@ static void dw_pcie_writel_ib_unroll(struct =

dw_pcie

Quoted 5 lines

*pci, u32 index, u32 reg,

Quoted 4 lines
drivers/pci/dwc/pcie-designware.c +0 -1
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, =

int

Quoted 9 lines

bar,

drivers/pci/dwc/pcie-designware.c static void dw_pcie_writel_ib_unroll(struct = · line 203

Quoted 1 line
drivers/pci/dwc/pcie-designware.c +1 -0
+static int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int

index, int bar,

Quoted 6 lines
drivers/pci/dwc/pcie-designware.c +0 -1
 				    u64 cpu_addr, enum dw_pcie_as_type as_type)
 {
 	int type;
--

2.11.0

Quoted 4 lines

=20
That indeed escaped in the refactoring :) Thanks!
=20

Best regards,
Jingoo Han

#3 lore raw
In reply to Carlos Palminha
Quoted 8 lines · Carlos Palminha

Helper functions dw_pcie_prog_*_atu_unroll don't need to be in global scope, so make it static.

Cleans up sparse warnings:
- symbol 'dw_pcie_prog_outbound_atu_unroll' was not declared. Should it be static?
- symbol 'dw_pcie_prog_inbound_atu_unroll' was not declared. Should it be static?

Applied with acks from Joao and Jingoo to pci/host-designware for v4.14, thanks!

I rewrapped these so they still fit in 80 columns, like the rest of the file.

Quoted 31 lines

---
Patch made against linux-next tree, tag next-20170714

 drivers/pci/dwc/pcie-designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dwc/pcie-designware.c +2 -3
index 0e03af279259..48d6d0712ea8 100644
@@ -107,7 +107,7 @@ static void dw_pcie_writel_ob_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
+static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
 				      u64 cpu_addr, u64 pci_addr, u32 size)
 {
 	u32 retries, val;
@@ -200,7 +200,7 @@ static void dw_pcie_writel_ib_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
+static int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
 				    u64 cpu_addr, enum dw_pcie_as_type as_type)
 {
 	int type;
--

2.11.0

#4 lore raw

thanks

Quoted 47 lines · Bjorn Helgaas
Quoted 8 lines · Carlos Palminha

Helper functions dw_pcie_prog_*_atu_unroll don't need to be in global scope, so make it static.

Cleans up sparse warnings:
- symbol 'dw_pcie_prog_outbound_atu_unroll' was not declared. Should it be static?
- symbol 'dw_pcie_prog_inbound_atu_unroll' was not declared. Should it be static?

Applied with acks from Joao and Jingoo to pci/host-designware for v4.14, thanks!

I rewrapped these so they still fit in 80 columns, like the rest of the file.

Quoted 31 lines

---
Patch made against linux-next tree, tag next-20170714

 drivers/pci/dwc/pcie-designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/dwc/pcie-designware.c +2 -3
index 0e03af279259..48d6d0712ea8 100644
@@ -107,7 +107,7 @@ static void dw_pcie_writel_ob_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
+static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, int type,
 				      u64 cpu_addr, u64 pci_addr, u32 size)
 {
 	u32 retries, val;
@@ -200,7 +200,7 @@ static void dw_pcie_writel_ib_unroll(struct dw_pcie *pci, u32 index, u32 reg,
 	dw_pcie_writel_dbi(pci, offset + reg, val);
 }
 
-int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
+static int dw_pcie_prog_inbound_atu_unroll(struct dw_pcie *pci, int index, int bar,
 				    u64 cpu_addr, enum dw_pcie_as_type as_type)
 {
 	int type;
--

2.11.0