qemu-patch-raspberry4/include
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
..
block -----BEGIN PGP SIGNATURE----- 2017-05-12 10:39:23 -04:00
crypto crypto: qcrypto_random_bytes() now works on windows w/o any other crypto libs 2017-05-09 14:41:47 +01:00
disas Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
exec ram: Split dirty bitmap by RAMBlock 2017-05-04 10:00:38 +02:00
fpu softfloat: Add float128_to_uint32_round_to_zero() 2017-02-22 11:28:28 +11:00
hw qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
io trivial patches for 2017-05-10 2017-05-10 12:31:19 -04:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migration/next for 20170504 2017-05-05 16:52:35 +01:00
monitor qmp: Dumb down how we run QMP command registration 2017-03-05 09:02:10 +01:00
net slirp: add a fake NC-SI backend 2017-04-25 19:17:25 +08:00
qapi qapi: Document intended use of @name within alternate visits 2017-05-09 09:14:40 +02:00
qemu ui: add egl-headless 2017-05-15 14:26:47 +01:00
qom spapr: add node-id property to sPAPR core 2017-05-11 16:08:48 -03:00
standard-headers update Linux headers to 4.11 2017-02-28 16:18:49 +00:00
sysemu xen/mapcache: store dma information in revmapcache entries for debugging 2017-05-16 11:49:09 -07:00
ui opengl: add egl-headless display 2017-05-12 12:02:48 +02:00
elf.h nios2: Add usermode binaries emulation 2017-01-24 13:10:35 -08:00
glib-compat.h qga: Add 'guest-get-users' command 2017-04-26 23:57:45 -05:00
qemu-common.h Update copyright year 2017-02-28 09:03:39 +03:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00