qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"open list:Trivial patches" <qemu-trivial@nongnu.org>,
	Alistair Francis <alistair@alistair23.me>,
	Michael Tokarev <mjt@tls.msk.ru>,
	qemu-arm@nongnu.org
Subject: Re: [PATCH 2/2] hw/sd/pxa2xx_mmci: Trivial simplification
Date: Mon, 6 Jul 2020 19:08:43 +0200	[thread overview]
Message-ID: <c711e521-9810-051c-685a-4dc9ebb0e762@vivier.eu> (raw)
In-Reply-To: <20200705213350.24725-3-f4bug@amsat.org>

Le 05/07/2020 à 23:33, Philippe Mathieu-Daudé a écrit :
> Avoid declaring PXA2xxMMCIState local variable, return it directly.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/sd/pxa2xx_mmci.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
> index 9482b9212d..2996a2ef17 100644
> --- a/hw/sd/pxa2xx_mmci.c
> +++ b/hw/sd/pxa2xx_mmci.c
> @@ -480,10 +480,8 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
>  {
>      DeviceState *dev;
>      SysBusDevice *sbd;
> -    PXA2xxMMCIState *s;
>  
>      dev = qdev_new(TYPE_PXA2XX_MMCI);
> -    s = PXA2XX_MMCI(dev);
>      sbd = SYS_BUS_DEVICE(dev);
>      sysbus_mmio_map(sbd, 0, base);
>      sysbus_connect_irq(sbd, 0, irq);
> @@ -491,7 +489,7 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
>      qdev_connect_gpio_out_named(dev, "tx-dma", 0, tx_dma);
>      sysbus_realize_and_unref(sbd, &error_fatal);
>  
> -    return s;
> +    return PXA2XX_MMCI(dev);
>  }
>  
>  static void pxa2xx_mmci_set_inserted(DeviceState *dev, bool inserted)
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


  parent reply	other threads:[~2020-07-06 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 21:33 [PATCH 0/2] hw/sd/pxa2xx_mmci: Do not create SD card within the SDHCI controller Philippe Mathieu-Daudé
2020-07-05 21:33 ` [PATCH 1/2] " Philippe Mathieu-Daudé
2020-07-06 16:38   ` Alistair Francis
2020-07-09 18:43   ` Peter Maydell
2020-07-05 21:33 ` [PATCH 2/2] hw/sd/pxa2xx_mmci: Trivial simplification Philippe Mathieu-Daudé
2020-07-06 16:39   ` Alistair Francis
2020-07-06 17:08   ` Laurent Vivier [this message]
2020-07-09 18:45 ` [PATCH 0/2] hw/sd/pxa2xx_mmci: Do not create SD card within the SDHCI controller Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c711e521-9810-051c-685a-4dc9ebb0e762@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alistair@alistair23.me \
    --cc=f4bug@amsat.org \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).