qemu-e2k/include/hw
Eduardo Habkost e90f2a8c3e qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable
cannot_instantiate_with_device_add_yet was introduced by commit
efec3dd631 to replace no_user. It was
supposed to be a temporary measure.

When it was introduced, we had 54
cannot_instantiate_with_device_add_yet=true lines in the code.
Today (3 years later) this number has not shrunk: we now have
57 cannot_instantiate_with_device_add_yet=true lines. I think it
is safe to say it is not a temporary measure, and we won't see
the flag go away soon.

Instead of a long field name that misleads people to believe it
is temporary, replace it a shorter and less misleading field:
user_creatable.

Except for code comments, changes were generated using the
following Coccinelle patch:

  @@
  expression DC;
  @@
  (
  -DC->cannot_instantiate_with_device_add_yet = false;
  +DC->user_creatable = true;
  |
  -DC->cannot_instantiate_with_device_add_yet = true;
  +DC->user_creatable = false;
  )

  @@
  typedef ObjectClass;
  expression dc;
  identifier class, data;
  @@
   static void device_class_init(ObjectClass *class, void *data)
   {
   ...
   dc->hotpluggable = true;
  +dc->user_creatable = true;
   ...
   }

  @@
  @@
   struct DeviceClass {
   ...
  -bool cannot_instantiate_with_device_add_yet;
  +bool user_creatable;
   ...
  }

  @@
  expression DC;
  @@
  (
  -!DC->cannot_instantiate_with_device_add_yet
  +DC->user_creatable
  |
  -DC->cannot_instantiate_with_device_add_yet
  +!DC->user_creatable
  )

Cc: Alistair Francis <alistair.francis@xilinx.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Thomas Huth <thuth@redhat.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20170503203604.31462-2-ehabkost@redhat.com>
[ehabkost: kept "TODO remove once we're there" comment]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-05-17 10:37:00 -03:00
..
acpi numa: Allow setting NUMA distance for different NUMA nodes 2017-05-11 16:08:37 -03:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
arm aspeed: add a FTGMAC100 nic 2017-04-25 19:17:25 +08:00
audio Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
block hw/block: Introduce share-rw qdev property 2017-02-28 20:40:36 +01:00
char char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
core generic-loader: Add a generic loader 2016-10-04 13:28:09 +01:00
cpu qapi: keep names in 'CpuInstanceProperties' in sync with struct CPUCore 2016-06-27 13:15:06 +10:00
cris char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
display Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
dma include: Fix typos found by codespell 2017-01-24 23:26:52 +03:00
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
i386 hw/i386: Build-time assertion on pc/q35 reset register being identical. 2017-05-03 12:29:40 +02:00
ide ide: core: add cleanup function 2017-03-15 20:50:14 -04:00
input ps2: fix mouse mappings for right/middle button 2017-02-20 11:25:38 +01:00
intc hw/intc/arm_gicv3_kvm: Add ICC_SRE_EL1 register to vmstate 2017-02-28 17:10:00 +00:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi ipmi: introduce an ipmi_bmc_gen_event() API 2017-04-26 12:41:55 +10:00
isa portio: keep references on portio 2016-09-08 18:05:21 +04:00
kvm hw: move headers to include/ 2013-04-08 18:13:10 +02:00
lm32 intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface 2016-10-04 10:00:25 +02:00
m68k hw/char/mcf_uart: QOMify the ColdFire UART 2017-02-16 14:06:56 +01:00
mem nvdimm acpi: rename nvdimm_acpi_hotplug 2016-11-15 17:20:37 +02:00
mips Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
misc target-arm: Implement BCM2835 hardware RNG 2017-02-28 12:08:13 +00:00
net net/ftgmac100: add a 'aspeed' property 2017-04-25 19:17:25 +08:00
nvram fw-cfg: turn FW_CFG_FILE_SLOTS into a device property 2017-01-18 22:59:53 +02:00
pci pci: Reduce scope of error injection 2017-05-08 20:32:14 +02:00
pci-host pseries: Don't expose PCIe extended config space on older machine types 2017-03-14 11:54:17 +11:00
ppc x86 and machine queue, 2017-05-11 2017-05-15 14:12:03 +01:00
s390x Basic support for using channel-attached 3270 'green-screen' 2017-05-05 16:56:38 +01:00
scsi hw: Deprecate -drive if=scsi with non-onboard HBAs 2017-02-21 13:17:45 +01:00
sd hw/sd: add card-reparenting function 2017-02-28 17:10:00 +00:00
sh4 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
smbios smbios: filter based on CONFIG_SMBIOS rather than TARGET 2017-01-16 17:52:34 +01:00
sparc char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
ssi aspeed/smc: handle SPI flash Command mode 2017-01-20 11:15:08 +00:00
timer armv7m: Split systick out from NVIC 2017-02-28 16:18:49 +00:00
tricore Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
unicore32 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
usb Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vfio vfio: Pass an error object to vfio_get_device 2016-10-17 10:58:00 -06:00
virtio virtio-gpu: move virtio_gpu_gl_block 2017-05-12 12:02:48 +02:00
watchdog wdt: Add Aspeed watchdog device model 2017-02-07 18:29:59 +00:00
xen xen/9pfs: build and register Xen 9pfs backend 2017-04-25 11:04:33 -07:00
boards.h machine: call machine init from wrapper 2017-05-11 16:08:50 -03:00
bt.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
compat.h s390x: introduce 2.10 compat machine 2017-04-21 09:32:09 +02:00
devices.h sm501: QOMify 2017-04-24 12:32:12 +01:00
elf_ops.h elf-loader: Allow late loading of elf 2017-02-28 12:04:48 +01:00
empty_slot.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
fw-path-provider.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hotplug.h qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
hw.h hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
ide.h xen-platform: add missing disk unplug option 2017-01-27 15:23:29 -08:00
irq.h irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader-fit.h loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
loader.h elf-loader: Allow late loading of elf 2017-02-28 12:04:48 +01:00
nmi.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
or-irq.h irq: Add a new irq device that allows the ORing of lines 2016-10-04 13:28:07 +01:00
pcmcia.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
platform-bus.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
ptimer.h tests: fix ptimer leaks 2017-03-01 00:09:28 +04:00
qdev-core.h qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
qdev-dma.h qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
qdev-properties.h qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
qdev.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
register.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
registerfields.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
stream.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sysbus.h sysbus: Remove ignored return value of FindSysbusDeviceFunc 2016-09-27 17:03:34 -03:00
usb.h usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00