OSDN Git Service

powerpc/mpic_msgr: fix cast removes address space of expression warnings
authorruanjinjie <ruanjinjie@huawei.com>
Wed, 19 Oct 2022 06:34:14 +0000 (14:34 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:49 +0000 (23:31 +1100)
commit16a3f41ff3322830683d3ccc14d77736829c61bf
treed9447361f87918d35f0cc18ecd3f6a496363f581
parent8b49670f3bb3f10cd4d5a6dca17f5a31b173ecdc
powerpc/mpic_msgr: fix cast removes address space of expression warnings

When build Linux kernel, encounter the following warnings:

./arch/powerpc/sysdev/mpic_msgr.c:230:38: warning: cast removes address space '__iomem' of expression
./arch/powerpc/sysdev/mpic_msgr.c:230:27: warning: incorrect type in assignment (different address spaces)

The data type of msgr->mer and msgr->base are 'u32 __iomem *', but
converted to 'u32 *' and 'u8 *' directly and cause above warnings, now
instead of using a type cast, change the size of the pointer offset to fix
these warnings.

Signed-off-by: ruanjinjie <ruanjinjie@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221019063414.3758087-1-ruanjinjie@huawei.com
arch/powerpc/sysdev/mpic_msgr.c