qemu-patch-raspberry4/hw/net
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
..
fsl_etsec trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
rocker pci: Convert msix_init() to Error and fix callers 2017-02-01 03:37:18 +02:00
allwinner_emac.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
cadence_gem.c cadence_gem: Make the revision a property 2017-04-20 17:39:17 +01:00
dp8393x.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
e1000.c e1000: disable debug by default 2017-03-31 08:48:13 +08:00
e1000_regs.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
e1000e.c e1000e: correctly tear down MSI-X memory regions 2017-03-14 15:39:55 +08:00
e1000e_core.c net: e1000e: fix an infinite loop issue 2017-02-15 11:18:57 +08:00
e1000e_core.h e1000e: Flush all receive queues on receive enable 2016-09-27 17:54:22 +08:00
e1000x_common.c hw/net/e1000: Don't use *_to_cpup() 2016-06-27 16:39:56 +01:00
e1000x_common.h e1000: Move out code that will be reused in e1000e 2016-06-02 10:42:29 +08:00
eepro100.c net: eepro100: fix memory leak in device uninit 2016-10-26 09:57:59 +08:00
etraxfs_eth.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
ftgmac100.c net/ftgmac100: add a 'aspeed' property 2017-04-25 19:17:25 +08:00
imx_fec.c net: imx: limit buffer descriptor count 2017-02-15 11:18:57 +08:00
lan9118.c hw/ptimer: Introduce timer policy feature 2016-09-22 18:13:06 +01:00
lance.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
Makefile.objs net: add FTGMAC100 support 2017-04-24 11:30:03 +08:00
mcf_fec.c hw/net: implement MIB counters in mcf_fec driver 2017-03-14 15:39:55 +08:00
milkymist-minimac2.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
mipsnet.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
ne2000-isa.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
ne2000.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
ne2000.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
net_rx_pkt.c NetRxPkt: Remove code duplication in net_rx_pkt_pull_data() 2017-03-06 11:46:02 +08:00
net_rx_pkt.h net_pkt: Extend packet abstraction as required by e1000e functionality 2016-06-02 10:42:28 +08:00
net_tx_pkt.c net: vmxnet: use g_new for pkt initialisation 2016-08-18 12:05:18 +08:00
net_tx_pkt.h clean-includes: run it once more 2016-06-16 18:39:03 +02:00
opencores_eth.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
pcnet-pci.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
pcnet.c net: pcnet: fix source formatting and indentation 2016-10-26 09:57:59 +08:00
pcnet.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
rtl8139.c rtl8139: correctly handle PHY reset 2017-01-06 10:38:05 +08:00
smc91c111.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
spapr_llan.c hw/net/spapr_llan: 6 byte mac address device tree entry 2017-02-22 14:28:53 +11:00
stellaris_enet.c arm: stellaris: make MII accesses complete immediately 2017-01-27 15:29:08 +00:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00
vhost_net.c vhost_net: device IOTLB support 2017-01-18 22:59:53 +02:00
virtio-net.c virtio-net: avoid call tap_enable when there's only one queue 2017-03-31 08:48:13 +08:00
vmware_utils.h vmxnet3: Fix reading/writing guest memory specially when behind an IOMMU 2016-06-28 10:13:57 +08:00
vmxnet3.c vmxnet3: VMStatify rx/tx q_descr and int_state 2017-03-06 11:46:02 +08:00
vmxnet3.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
vmxnet_debug.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
xen_nic.c xen: Rename xen_be_send_notify 2016-10-28 17:54:21 -07:00
xgmac.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
xilinx_axienet.c qapi: Change Netdev into a flat union 2016-07-19 20:18:02 +02:00
xilinx_ethlite.c hw/net: Fix a heap overflow in xlnx.xps-ethernetlite 2016-08-09 15:27:18 +08:00