summaryrefslogtreecommitdiffstats
path: root/hw/arm
diff options
context:
space:
mode:
authorMarkus Armbruster2019-03-08 10:45:56 +0100
committerMarkus Armbruster2019-03-11 22:53:44 +0100
commit1643406520f8ff6f4cc11062950f5f898b03b573 (patch)
treecb7371ea953caeb88333bde600d096d8b359c255 /hw/arm
parentMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff)
downloadqemu-1643406520f8ff6f4cc11062950f5f898b03b573.tar.gz
qemu-1643406520f8ff6f4cc11062950f5f898b03b573.tar.xz
qemu-1643406520f8ff6f4cc11062950f5f898b03b573.zip
pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02
flash.h's incomplete struct pflash_t is completed both in pflash_cfi01.c and in pflash_cfi02.c. The complete types are incompatible. This can hide type errors, such as passing a pflash_t created with pflash_cfi02_register() to pflash_cfi01_get_memory(). Furthermore, POSIX reserves typedef names ending with _t. Rename the two structs to PFlashCFI01 and PFlashCFI02. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190308094610.21210-2-armbru@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/vexpress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index c02d18ee61..ed46d2e730 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -512,8 +512,8 @@ static void vexpress_modify_dtb(const struct arm_boot_info *info, void *fdt)
/* Open code a private version of pflash registration since we
* need to set non-default device width for VExpress platform.
*/
-static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name,
- DriveInfo *di)
+static PFlashCFI01 *ve_pflash_cfi01_register(hwaddr base, const char *name,
+ DriveInfo *di)
{
DeviceState *dev = qdev_create(NULL, "cfi.pflash01");
@@ -536,7 +536,7 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name,
qdev_init_nofail(dev);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
- return OBJECT_CHECK(pflash_t, (dev), "cfi.pflash01");
+ return OBJECT_CHECK(PFlashCFI01, (dev), "cfi.pflash01");
}
static void vexpress_common_init(MachineState *machine)
@@ -548,7 +548,7 @@ static void vexpress_common_init(MachineState *machine)
qemu_irq pic[64];
uint32_t sys_id;
DriveInfo *dinfo;
- pflash_t *pflash0;
+ PFlashCFI01 *pflash0;
I2CBus *i2c;
ram_addr_t vram_size, sram_size;
MemoryRegion *sysmem = get_system_memory();