summary refs log tree commit diff stats
path: root/hw/m68k/virt.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-10-24 10:30:08 +0200
committerThomas Huth <huth@tuxfamily.org>2023-11-01 07:20:34 +0100
commitb2897f7ed446aedf2e5ed33762ac823db13c2f56 (patch)
tree795a2d9c3b13c7e787d6e7092f2c042f92ab94c8 /hw/m68k/virt.c
parent4c4ee593d636dc462b6fe15e00c31d6ff6c72bd0 (diff)
downloadfocaccia-qemu-b2897f7ed446aedf2e5ed33762ac823db13c2f56.tar.gz
focaccia-qemu-b2897f7ed446aedf2e5ed33762ac823db13c2f56.zip
hw/m68k/next-cube: Do not open-code sysbus_create_simple()
Mechanical change using the following coccinelle script:

  @@
  identifier dev;
  identifier sbd;
  expression qom_type;
  expression addr;
  @@
  -    dev = qdev_new(qom_type);
  -    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
  -    sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, addr);
  +    dev = sysbus_create_simple(qom_type, addr, NULL);

then manually removing the 'dev' variable to avoid:

  error: variable 'dev' set but not used [-Werror,-Wunused-but-set-variable]

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Message-ID: <20231024083010.12453-6-philmd@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Diffstat (limited to 'hw/m68k/virt.c')
0 files changed, 0 insertions, 0 deletions