linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: mobiveil: fix different address space warnings of sparse
@ 2020-03-17 14:51 Zhiqiang Hou
  2020-03-17 15:50 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 2+ messages in thread
From: Zhiqiang Hou @ 2020-03-17 14:51 UTC (permalink / raw)
  To: linux-pci, linux-kernel, lorenzo.pieralisi, amurray, bhelgaas
  Cc: Hou Zhiqiang

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Fix the sparse warnings below:

drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49: warning: incorrect type in return expression (different address spaces)
drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49:    expected void *
drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49:    got void [noderef] <asn:2> *
drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41: warning: incorrect type in return expression (different address spaces)
drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41:    expected void *
drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41:    got void [noderef] <asn:2> *
drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34: warning: incorrect type in argument 1 (different address spaces)
drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34:    expected void [noderef] <asn:2> *addr
drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34:    got void *[assigned] addr
drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35: warning: incorrect type in argument 1 (different address spaces)
drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35:    expected void [noderef] <asn:2> *addr
drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35:    got void *[assigned] addr

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reported-by: kbuild test robot <lkp@intel.com>
---
 drivers/pci/controller/mobiveil/pcie-mobiveil.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.c b/drivers/pci/controller/mobiveil/pcie-mobiveil.c
index 23ab904989ea..62ecbaeb0a60 100644
--- a/drivers/pci/controller/mobiveil/pcie-mobiveil.c
+++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.c
@@ -36,7 +36,8 @@ static void mobiveil_pcie_sel_page(struct mobiveil_pcie *pcie, u8 pg_idx)
 	writel(val, pcie->csr_axi_slave_base + PAB_CTRL);
 }
 
-static void *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie, u32 off)
+static void __iomem *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie,
+					     u32 off)
 {
 	if (off < PAGED_ADDR_BNDRY) {
 		/* For directly accessed registers, clear the pg_sel field */
@@ -97,7 +98,7 @@ static int mobiveil_pcie_write(void __iomem *addr, int size, u32 val)
 
 u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size)
 {
-	void *addr;
+	void __iomem *addr;
 	u32 val;
 	int ret;
 
@@ -113,7 +114,7 @@ u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size)
 void mobiveil_csr_write(struct mobiveil_pcie *pcie, u32 val, u32 off,
 			       size_t size)
 {
-	void *addr;
+	void __iomem *addr;
 	int ret;
 
 	addr = mobiveil_pcie_comp_addr(pcie, off);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: mobiveil: fix different address space warnings of sparse
  2020-03-17 14:51 [PATCH] PCI: mobiveil: fix different address space warnings of sparse Zhiqiang Hou
@ 2020-03-17 15:50 ` Lorenzo Pieralisi
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2020-03-17 15:50 UTC (permalink / raw)
  To: Zhiqiang Hou; +Cc: linux-pci, linux-kernel, amurray, bhelgaas

On Tue, Mar 17, 2020 at 10:51:25PM +0800, Zhiqiang Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> 
> Fix the sparse warnings below:
> 
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49: warning: incorrect type in return expression (different address spaces)
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49:    expected void *
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:44:49:    got void [noderef] <asn:2> *
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41: warning: incorrect type in return expression (different address spaces)
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41:    expected void *
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:48:41:    got void [noderef] <asn:2> *
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34:    expected void [noderef] <asn:2> *addr
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:106:34:    got void *[assigned] addr
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35: warning: incorrect type in argument 1 (different address spaces)
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35:    expected void [noderef] <asn:2> *addr
> drivers/pci/controller/mobiveil/pcie-mobiveil.c:121:35:    got void *[assigned] addr
> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---
>  drivers/pci/controller/mobiveil/pcie-mobiveil.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil.c b/drivers/pci/controller/mobiveil/pcie-mobiveil.c
> index 23ab904989ea..62ecbaeb0a60 100644
> --- a/drivers/pci/controller/mobiveil/pcie-mobiveil.c
> +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil.c
> @@ -36,7 +36,8 @@ static void mobiveil_pcie_sel_page(struct mobiveil_pcie *pcie, u8 pg_idx)
>  	writel(val, pcie->csr_axi_slave_base + PAB_CTRL);
>  }
>  
> -static void *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie, u32 off)
> +static void __iomem *mobiveil_pcie_comp_addr(struct mobiveil_pcie *pcie,
> +					     u32 off)
>  {
>  	if (off < PAGED_ADDR_BNDRY) {
>  		/* For directly accessed registers, clear the pg_sel field */
> @@ -97,7 +98,7 @@ static int mobiveil_pcie_write(void __iomem *addr, int size, u32 val)
>  
>  u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size)
>  {
> -	void *addr;
> +	void __iomem *addr;
>  	u32 val;
>  	int ret;
>  
> @@ -113,7 +114,7 @@ u32 mobiveil_csr_read(struct mobiveil_pcie *pcie, u32 off, size_t size)
>  void mobiveil_csr_write(struct mobiveil_pcie *pcie, u32 val, u32 off,
>  			       size_t size)
>  {
> -	void *addr;
> +	void __iomem *addr;
>  	int ret;
>  
>  	addr = mobiveil_pcie_comp_addr(pcie, off);
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-17 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 14:51 [PATCH] PCI: mobiveil: fix different address space warnings of sparse Zhiqiang Hou
2020-03-17 15:50 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).