Skip to content

RFC qdev: property macros.

Gerd Hoffmann qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qdev/pci: make PCIDevice->devfn uint32_thw/pci.h+1 -10 replies
2/2qdev/prop: macros for creating typechecked properties.hw/pci.c hw/qdev-addr.h hw/qdev.h+48 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RfC PATCH 0/2] qdev: property macros.

Hi folks,

Presenting a new version of my patch to continue the discussion how the macros should look like ;)

There are DEFINE_PROP_$TYPE("name", struct, field, default) macros for each property type, thus no gcc-powered automagic selection.

typeof(struct->field) is verifyed to be the correct one for the given property though (new in this version). This uses gcc extentions, but as it is a check only it could easily be turned off for non-gcc compilers if needed.

Comments?

cheers,
Gerd