From a4b1e9d3f863a8dfbf28f5469dcc95a07c9ac105 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 12 Aug 2021 10:33:49 +0100 Subject: hw/arm/msf2_soc: Don't allocate separate MemoryRegions In the realize method of the msf2-soc SoC object, we call g_new() to create new MemoryRegion objects for the nvm, nvm_alias, and sram. This is unnecessary; make these MemoryRegions member fields of the device state struct instead. Signed-off-by: Peter Maydell Reviewed-by: Alexandre Iooss Message-id: 20210812093356.1946-19-peter.maydell@linaro.org --- include/hw/arm/msf2-soc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/arm') diff --git a/include/hw/arm/msf2-soc.h b/include/hw/arm/msf2-soc.h index d406184685..38e10ce20a 100644 --- a/include/hw/arm/msf2-soc.h +++ b/include/hw/arm/msf2-soc.h @@ -65,6 +65,10 @@ struct MSF2State { MSSTimerState timer; MSSSpiState spi[MSF2_NUM_SPIS]; MSF2EmacState emac; + + MemoryRegion nvm; + MemoryRegion nvm_alias; + MemoryRegion sram; }; #endif -- cgit v1.2.3