[PATCH v2 2/3] net: ftmac100: simplify priv->iobase casting

Sergei Antonov saproj at gmail.com
Fri Feb 3 20:09:40 CET 2023


On Fri, 3 Feb 2023 at 01:05, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Jan 19, 2023 at 10:51:15PM +0300, Sergei Antonov wrote:
>
> > Replace 'phys_addr_t iobase' with 'struct ftmac100 *ftmac100'
> > in order to cast once on assignment and remove casting in a
> > number of other places.
> >
> > Signed-off-by: Sergei Antonov <saproj at gmail.com>
> > Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
>
> This introduces:
>    riscv32:  +   ae350_rv32
> +(ae350_rv32) drivers/net/ftmac100.c: In function 'ftmac100_of_to_plat':
> +(ae350_rv32) drivers/net/ftmac100.c:317:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> +(ae350_rv32)   317 |         priv->ftmac100 = (struct ftmac100 *)pdata->iobase;

Thanks! I have just sent a v3 of the patch in which cast is replaced
with phys_to_virt().


More information about the U-Boot mailing list