[PATCH] clk: mvebu: armada-37xx-periph: fix __iomem casts in structure init
Brian Masney
bmasney at redhat.com
Tue Mar 10 06:28:30 PDT 2026
On Tue, Mar 10, 2026 at 12:36:25PM +0000, Ben Dooks wrote:
> There are a number of casts to "void __iomem *" in the initialsation
> of the driver's clk information. Fix this by adding a helper macro
> for the cast.
>
> Silences a number of sparse warnings:
>
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: warning: incorrect type in initializer (different address spaces)
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: expected void [noderef] __iomem *reg
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: got void *
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: warning: incorrect type in initializer (different address spaces)
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: expected void [noderef] __iomem *reg1
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: got void *
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: warning: incorrect type in initializer (different address spaces)
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: expected void [noderef] __iomem *reg2
> drivers/clk/mvebu/armada-37xx-periph.c:254:1: got void *
> drivers/clk/mvebu/armada-37xx-periph.c:255:1: warning: incorrect type in initializer (different address spaces)
> drivers/clk/mvebu/armada-37xx-periph.c:255:1: expected void [noderef] __iomem *reg
> drivers/clk/mvebu/armada-37xx-periph.c:255:1: got void *
> ...
>
> Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
Reviewed-by: Brian Masney <bmasney at redhat.com>
More information about the linux-arm-kernel
mailing list