Skip to content

Commit 7ad36e2

Browse files
Markus Armbrusterhuth
authored andcommitted
hw: Mark nd_table[] misuse in realize methods FIXME
nd_table[] contains NIC configuration for boards to pick up. Device code has no business looking there. Several devices do it anyway. Two of them already have a suitable FIXME comment: "allwinner-a10" and "msf2-soc". Copy it to the others: "allwinner-h3", "xlnx-versal", "xlnx,zynqmp", "sparc32-ledma", "riscv.sifive.u.soc". Signed-off-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Reviewed-by: Niek Linnenbank <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent 2b06502 commit 7ad36e2

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

hw/arm/allwinner-h3.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ static void allwinner_h3_realize(DeviceState *dev, Error **errp)
358358
"sd-bus");
359359

360360
/* EMAC */
361+
/* FIXME use qdev NIC properties instead of nd_table[] */
361362
if (nd_table[0].used) {
362363
qemu_check_nic_model(&nd_table[0], TYPE_AW_SUN8I_EMAC);
363364
qdev_set_nic_properties(DEVICE(&s->emac), &nd_table[0]);

hw/arm/xlnx-versal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ static void versal_create_gems(Versal *s, qemu_irq *pic)
160160
object_initialize_child(OBJECT(s), name, &s->lpd.iou.gem[i],
161161
TYPE_CADENCE_GEM);
162162
dev = DEVICE(&s->lpd.iou.gem[i]);
163+
/* FIXME use qdev NIC properties instead of nd_table[] */
163164
if (nd->used) {
164165
qemu_check_nic_model(nd, "cadence_gem");
165166
qdev_set_nic_properties(dev, nd);

hw/arm/xlnx-zynqmp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp)
455455
for (i = 0; i < XLNX_ZYNQMP_NUM_GEMS; i++) {
456456
NICInfo *nd = &nd_table[i];
457457

458+
/* FIXME use qdev NIC properties instead of nd_table[] */
458459
if (nd->used) {
459460
qemu_check_nic_model(nd, TYPE_CADENCE_GEM);
460461
qdev_set_nic_properties(DEVICE(&s->gem[i]), nd);

hw/dma/sparc32_dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ static void sparc32_ledma_device_realize(DeviceState *dev, Error **errp)
341341
DeviceState *d;
342342
NICInfo *nd = &nd_table[0];
343343

344+
/* FIXME use qdev NIC properties instead of nd_table[] */
344345
qemu_check_nic_model(nd, TYPE_LANCE);
345346

346347
d = qdev_new(TYPE_LANCE);

hw/riscv/sifive_u.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ static void sifive_u_soc_realize(DeviceState *dev, Error **errp)
714714
}
715715
sysbus_mmio_map(SYS_BUS_DEVICE(&s->otp), 0, memmap[SIFIVE_U_OTP].base);
716716

717+
/* FIXME use qdev NIC properties instead of nd_table[] */
717718
if (nd->used) {
718719
qemu_check_nic_model(nd, TYPE_CADENCE_GEM);
719720
qdev_set_nic_properties(DEVICE(&s->gem), nd);

0 commit comments

Comments
 (0)