Re: [PATCH] pata_falcon: Add missing __iomem annotations

From: Finn Thain
Date: Wed Nov 24 2021 - 20:11:43 EST


On Wed, 24 Nov 2021, Michael Schmitz wrote:

> On 24/11/21 17:25, Finn Thain wrote:
> > The zero day bot reported some sparse complaints in pata_falcon.c. E.g.
> >
> > drivers/ata/pata_falcon.c:58:41: warning: cast removes address space
> > '__iomem' of expression
> > drivers/ata/pata_falcon.c:58:41: warning: incorrect type in argument 1
> > (different address spaces)
> > drivers/ata/pata_falcon.c:58:41: expected unsigned short volatile
> > [noderef] [usertype] __iomem *port
> > drivers/ata/pata_falcon.c:58:41: got unsigned short [usertype] *
> >
> > The same thing shows up in 8 places, all told. Avoid this by use of
> > __iomem type casts.
>
> Seeing as data_addr was explicitly typed as __iomem, your fix is clearly
> correct. Bit embarrassing to have missed that (I remember adding __iomem
> annotations elsewhere at some stage).
>
> If you think there's any need to test this change, say so.
>

There's no change in pata_falcon.o.

> Reviewed-by: Michael Schmitz <schmitzmic@xxxxxxxxx>
>

Thanks.