* [PATCH] powerpc/476: Fix sparse report
@ 2021-09-18 9:22 Christophe Leroy
2021-09-21 0:38 ` Alistair Popple
2021-10-11 12:06 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy @ 2021-09-18 9:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: Alistair Popple, linuxppc-dev, linux-kernel, kernel test robot
arch/powerpc/platforms/44x/ppc476.c:236:17: warning: cast removes address space '__iomem' of expression
arch/powerpc/platforms/44x/ppc476.c:241:34: warning: incorrect type in argument 1 (different address spaces)
arch/powerpc/platforms/44x/ppc476.c:241:34: expected void const volatile [noderef] __iomem *addr
arch/powerpc/platforms/44x/ppc476.c:241:34: got unsigned char [usertype] *
arch/powerpc/platforms/44x/ppc476.c:243:17: warning: incorrect type in argument 1 (different address spaces)
arch/powerpc/platforms/44x/ppc476.c:243:17: expected void volatile [noderef] __iomem *addr
arch/powerpc/platforms/44x/ppc476.c:243:17: got unsigned char [usertype] *[assigned] fpga
Mark 'fpga' pointer as __iomem.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: ab9a4183fddf ("powerpc: Update currituck pci/usb fixup for new board revision")
Cc: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/platforms/44x/ppc476.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c
index 07f7e3ce67b5..fb7db5cedd4e 100644
--- a/arch/powerpc/platforms/44x/ppc476.c
+++ b/arch/powerpc/platforms/44x/ppc476.c
@@ -219,7 +219,7 @@ static int board_rev = -1;
static int __init ppc47x_get_board_rev(void)
{
int reg;
- u8 *fpga;
+ u8 __iomem *fpga;
struct device_node *np = NULL;
if (of_machine_is_compatible("ibm,currituck")) {
@@ -233,7 +233,7 @@ static int __init ppc47x_get_board_rev(void)
if (!np)
goto fail;
- fpga = (u8 *) of_iomap(np, 0);
+ fpga = of_iomap(np, 0);
of_node_put(np);
if (!fpga)
goto fail;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/476: Fix sparse report
2021-09-18 9:22 [PATCH] powerpc/476: Fix sparse report Christophe Leroy
@ 2021-09-21 0:38 ` Alistair Popple
2021-10-11 12:06 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Alistair Popple @ 2021-09-21 0:38 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Christophe Leroy
Cc: linuxppc-dev, linux-kernel, kernel test robot
Thanks, looks reasonable.
Reviewed-by: Alistair Popple <alistair@popple.id.au>
On Saturday, 18 September 2021 7:22:32 PM AEST Christophe Leroy wrote:
> arch/powerpc/platforms/44x/ppc476.c:236:17: warning: cast removes address space '__iomem' of expression
> arch/powerpc/platforms/44x/ppc476.c:241:34: warning: incorrect type in argument 1 (different address spaces)
> arch/powerpc/platforms/44x/ppc476.c:241:34: expected void const volatile [noderef] __iomem *addr
> arch/powerpc/platforms/44x/ppc476.c:241:34: got unsigned char [usertype] *
> arch/powerpc/platforms/44x/ppc476.c:243:17: warning: incorrect type in argument 1 (different address spaces)
> arch/powerpc/platforms/44x/ppc476.c:243:17: expected void volatile [noderef] __iomem *addr
> arch/powerpc/platforms/44x/ppc476.c:243:17: got unsigned char [usertype] *[assigned] fpga
>
> Mark 'fpga' pointer as __iomem.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: ab9a4183fddf ("powerpc: Update currituck pci/usb fixup for new board revision")
> Cc: Alistair Popple <alistair@popple.id.au>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/platforms/44x/ppc476.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/44x/ppc476.c b/arch/powerpc/platforms/44x/ppc476.c
> index 07f7e3ce67b5..fb7db5cedd4e 100644
> --- a/arch/powerpc/platforms/44x/ppc476.c
> +++ b/arch/powerpc/platforms/44x/ppc476.c
> @@ -219,7 +219,7 @@ static int board_rev = -1;
> static int __init ppc47x_get_board_rev(void)
> {
> int reg;
> - u8 *fpga;
> + u8 __iomem *fpga;
> struct device_node *np = NULL;
>
> if (of_machine_is_compatible("ibm,currituck")) {
> @@ -233,7 +233,7 @@ static int __init ppc47x_get_board_rev(void)
> if (!np)
> goto fail;
>
> - fpga = (u8 *) of_iomap(np, 0);
> + fpga = of_iomap(np, 0);
> of_node_put(np);
> if (!fpga)
> goto fail;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/476: Fix sparse report
2021-09-18 9:22 [PATCH] powerpc/476: Fix sparse report Christophe Leroy
2021-09-21 0:38 ` Alistair Popple
@ 2021-10-11 12:06 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-10-11 12:06 UTC (permalink / raw)
To: Paul Mackerras, Christophe Leroy, Benjamin Herrenschmidt,
Michael Ellerman
Cc: Alistair Popple, linuxppc-dev, kernel test robot, linux-kernel
On Sat, 18 Sep 2021 11:22:32 +0200, Christophe Leroy wrote:
> arch/powerpc/platforms/44x/ppc476.c:236:17: warning: cast removes address space '__iomem' of expression
> arch/powerpc/platforms/44x/ppc476.c:241:34: warning: incorrect type in argument 1 (different address spaces)
> arch/powerpc/platforms/44x/ppc476.c:241:34: expected void const volatile [noderef] __iomem *addr
> arch/powerpc/platforms/44x/ppc476.c:241:34: got unsigned char [usertype] *
> arch/powerpc/platforms/44x/ppc476.c:243:17: warning: incorrect type in argument 1 (different address spaces)
> arch/powerpc/platforms/44x/ppc476.c:243:17: expected void volatile [noderef] __iomem *addr
> arch/powerpc/platforms/44x/ppc476.c:243:17: got unsigned char [usertype] *[assigned] fpga
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/476: Fix sparse report
https://git.kernel.org/powerpc/c/494f238a3861863d908af7b98a369f6d8a986c85
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-11 12:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 9:22 [PATCH] powerpc/476: Fix sparse report Christophe Leroy
2021-09-21 0:38 ` Alistair Popple
2021-10-11 12:06 ` Michael Ellerman
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).