[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/23] hw/sd/pxa2xx_mmci: Trivial simplification
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/23] hw/sd/pxa2xx_mmci: Trivial simplification |
Date: |
Fri, 21 Aug 2020 19:28:55 +0200 |
Avoid declaring PXA2xxMMCIState local variable, return it directly.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200705213350.24725-3-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 9482b9212dd..2996a2ef177 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)
--
2.26.2
- [PULL 00/23] SD/MMC patches for 2020-08-21, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 01/23] hw/sd/pxa2xx_mmci: Do not create SD card within the SD host controller, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 02/23] hw/sd/pxa2xx_mmci: Trivial simplification,
Philippe Mathieu-Daudé <=
- [PULL 03/23] hw/lm32/milkymist: Un-inline milkymist_memcard_create(), Philippe Mathieu-Daudé, 2020/08/21
- [PULL 04/23] hw/sd/milkymist: Create the SDBus at init(), Philippe Mathieu-Daudé, 2020/08/21
- [PULL 05/23] hw/sd/milkymist: Do not create SD card within the SD host controller, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 06/23] hw/sd/pl181: Replace fprintf(stderr, "*\n") with error_report(), Philippe Mathieu-Daudé, 2020/08/21
- [PULL 07/23] hw/sd/pl181: Rename pl181_send_command() as pl181_do_command(), Philippe Mathieu-Daudé, 2020/08/21
- [PULL 08/23] hw/sd/pl181: Add TODO to use Fifo32 API, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 09/23] hw/sd/pl181: Use named GPIOs, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 11/23] hw/sd/pl181: Do not create SD card within the SD host controller, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 10/23] hw/sd/pl181: Expose a SDBus and connect the SDCard to it, Philippe Mathieu-Daudé, 2020/08/21
- [PULL 12/23] hw/sd/pl181: Replace disabled fprintf()s by trace events, Philippe Mathieu-Daudé, 2020/08/21