[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6fc4b62ee7754d78b8f7b9c2275bc47e@AcuMS.aculab.com>
Date: Fri, 11 Dec 2020 16:07:37 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Christophe Leroy' <christophe.leroy@...roup.eu>,
Xu Wang <vulab@...as.ac.cn>,
"pantelis.antoniou@...il.com" <pantelis.antoniou@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net: ethernet: fs-enet: remove casting dma_alloc_coherent
From: Christophe Leroy
> Sent: 11 December 2020 15:22
>
> Le 11/12/2020 à 09:52, Xu Wang a écrit :
> > Remove casting the values returned by dma_alloc_coherent.
>
> Can you explain more in the commit log ?
>
> As far as I can see, dma_alloc_coherent() doesn't return __iomem, and ring_base member is __iomem
Which is probably wrong - that is the kernel address of kernel memory.
So it shouldn't have the __iomem marker.
I wonder what else is wrong....
David
>
> Christophe
>
> >
> > Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> > ---
> > drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
> b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
> > index 99fe2c210d0f..3ae345676e50 100644
> > --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
> > +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
> > @@ -131,7 +131,7 @@ static int allocate_bd(struct net_device *dev)
> > struct fs_enet_private *fep = netdev_priv(dev);
> > const struct fs_platform_info *fpi = fep->fpi;
> >
> > - fep->ring_base = (void __force __iomem *)dma_alloc_coherent(fep->dev,
> > + fep->ring_base = dma_alloc_coherent(fep->dev,
> > (fpi->tx_ring + fpi->rx_ring) *
> > sizeof(cbd_t), &fep->ring_mem_addr,
> > GFP_KERNEL);
> >
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists