diff mbox

[3/6] powerpc/xics: Fully qualify cast to silence sparse

Message ID 1467616182-30886-3-git-send-email-dja@axtens.net (mailing list archive)
State Superseded
Headers show

Commit Message

Daniel Axtens July 4, 2016, 7:09 a.m. UTC
Make the cast fully line up with what out_rm8 expects.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 arch/powerpc/sysdev/xics/icp-native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Donnellan July 4, 2016, 7:27 a.m. UTC | #1
On 04/07/16 17:09, Daniel Axtens wrote:
> Make the cast fully line up with what out_rm8 expects.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Arnd Bergmann July 4, 2016, 7:46 a.m. UTC | #2
On Monday, July 4, 2016 5:09:39 PM CEST Daniel Axtens wrote:
> Make the cast fully line up with what out_rm8 expects.
> 
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---
>  arch/powerpc/sysdev/xics/icp-native.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c
> index afdf62f2a695..e9cffb06cc01 100644
> --- a/arch/powerpc/sysdev/xics/icp-native.c
> +++ b/arch/powerpc/sysdev/xics/icp-native.c
> @@ -176,7 +176,7 @@ void icp_native_cause_ipi_rm(int cpu)
>          * causing the IPI.
>          */
>         xics_phys = paca[cpu].kvm_hstate.xics_phys;
> -       out_rm8((u8 *)(xics_phys + XICS_MFRR), IPI_PRIORITY);
> +       out_rm8((volatile u8 __iomem *)(xics_phys + XICS_MFRR), IPI_PRIORITY);
>  }

We don't normally mark pointers as 'volatile' when passing them
to the MMIO accessors. The reason that they take a volatile argument
is mainly to avoid a warning for drivers that for historic reasons
use volatile pointers intead of __iomem pointers.

	Arnd
diff mbox

Patch

diff --git a/arch/powerpc/sysdev/xics/icp-native.c b/arch/powerpc/sysdev/xics/icp-native.c
index afdf62f2a695..e9cffb06cc01 100644
--- a/arch/powerpc/sysdev/xics/icp-native.c
+++ b/arch/powerpc/sysdev/xics/icp-native.c
@@ -176,7 +176,7 @@  void icp_native_cause_ipi_rm(int cpu)
 	 * causing the IPI.
 	 */
 	xics_phys = paca[cpu].kvm_hstate.xics_phys;
-	out_rm8((u8 *)(xics_phys + XICS_MFRR), IPI_PRIORITY);
+	out_rm8((volatile u8 __iomem *)(xics_phys + XICS_MFRR), IPI_PRIORITY);
 }
 #endif