[PATCH] mmc: pci: Drop the superfluous cast

Jaehoon Chung jh80.chung at samsung.com
Wed Nov 1 06:45:13 CET 2023



> -----Original Message-----
> From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Jaehoon Chung
> Sent: Tuesday, October 31, 2023 3:09 PM
> To: Bin Meng <bmeng at tinylab.org>; Peng Fan <peng.fan at nxp.com>
> Cc: u-boot at lists.denx.de
> Subject: Re: [PATCH] mmc: pci: Drop the superfluous cast
> 
> On 10/11/23 20:00, Bin Meng wrote:
> > dm_pci_map_bar() return a value of (void *) already, hence no need
> > to cast it again before assigning to host->ioaddr.
> >
> > Signed-off-by: Bin Meng <bmeng at tinylab.org>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>

Applied to u-boot-mmc/master. Thanks!

Best Regards,
Jaehoon Chung

> 
> Best Regards,
> Jaehoon Chung
> 
> > ---
> >
> >  drivers/mmc/pci_mmc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c
> > index 9fb7044029..4d163ccba0 100644
> > --- a/drivers/mmc/pci_mmc.c
> > +++ b/drivers/mmc/pci_mmc.c
> > @@ -50,8 +50,8 @@ static int pci_mmc_probe(struct udevice *dev)
> >  	desc = mmc_get_blk_desc(&plat->mmc);
> >  	desc->removable = !(plat->cfg.host_caps & MMC_CAP_NONREMOVABLE);
> >
> > -	host->ioaddr = (void *)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, 0, 0, PCI_REGION_TYPE,
> > -					      PCI_REGION_MEM);
> > +	host->ioaddr = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, 0, 0,
> > +				      PCI_REGION_TYPE, PCI_REGION_MEM);
> >  	host->name = dev->name;
> >  	host->cd_gpio = priv->cd_gpio;
> >  	host->mmc = &plat->mmc;




More information about the U-Boot mailing list