public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mmc: pci: Drop the superfluous cast
@ 2023-10-11 11:00 ` Bin Meng
  2023-10-12  3:41   ` Simon Glass
  2023-10-31  6:09   ` Jaehoon Chung
  0 siblings, 2 replies; 4+ messages in thread
From: Bin Meng @ 2023-10-11 11:00 UTC (permalink / raw)
  To: Jaehoon Chung, Peng Fan; +Cc: u-boot

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@tinylab.org>
---

 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: pci: Drop the superfluous cast
  2023-10-11 11:00 ` [PATCH] mmc: pci: Drop the superfluous cast Bin Meng
@ 2023-10-12  3:41   ` Simon Glass
  2023-10-31  6:09   ` Jaehoon Chung
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Glass @ 2023-10-12  3:41 UTC (permalink / raw)
  To: Bin Meng; +Cc: Jaehoon Chung, Peng Fan, u-boot

On Wed, 11 Oct 2023 at 04:05, Bin Meng <bmeng@tinylab.org> 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@tinylab.org>
> ---
>
>  drivers/mmc/pci_mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: pci: Drop the superfluous cast
  2023-10-11 11:00 ` [PATCH] mmc: pci: Drop the superfluous cast Bin Meng
  2023-10-12  3:41   ` Simon Glass
@ 2023-10-31  6:09   ` Jaehoon Chung
  2023-11-01  5:45     ` Jaehoon Chung
  1 sibling, 1 reply; 4+ messages in thread
From: Jaehoon Chung @ 2023-10-31  6:09 UTC (permalink / raw)
  To: Bin Meng, Peng Fan; +Cc: u-boot

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@tinylab.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] mmc: pci: Drop the superfluous cast
  2023-10-31  6:09   ` Jaehoon Chung
@ 2023-11-01  5:45     ` Jaehoon Chung
  0 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2023-11-01  5:45 UTC (permalink / raw)
  To: 'Bin Meng', 'Peng Fan'; +Cc: u-boot



> -----Original Message-----
> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Jaehoon Chung
> Sent: Tuesday, October 31, 2023 3:09 PM
> To: Bin Meng <bmeng@tinylab.org>; Peng Fan <peng.fan@nxp.com>
> Cc: u-boot@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@tinylab.org>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> Reviewed-by: Jaehoon Chung <jh80.chung@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;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-01  5:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231031060900epcas1p166ee69d14c52c948df7a9e8c298be45b@epcas1p1.samsung.com>
2023-10-11 11:00 ` [PATCH] mmc: pci: Drop the superfluous cast Bin Meng
2023-10-12  3:41   ` Simon Glass
2023-10-31  6:09   ` Jaehoon Chung
2023-11-01  5:45     ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox