> I don't think this is the right approach: I see around 1500 instances
> of acpi_device_id data with plain initializers and only about 50
> with named ones.  Converting all of them seems like a lot of
> extra work, and I'm fairly sure you can just change the
> driver_data to an anonymous union without this.

Sorry for the late reply, I was away.

You can change it to an anonymous union and the kernel modules can
build and then you can go over the code and set the designator only
for all of the entries that will make use of the driver_data_ptr field
(which is the union's second named member). However, you will still
get -Wmissing-braces in your build log for all other initializer
entries that still rely on positioning and resolve to the first union
member by default (the kernel_ulong_t). Adding an exception for this
warning seems like a bad practice. On x86_64 all warnings are promoted
to an actual hard build error via the defconfig. The other option is
to use more brackets instead of designated initializers for the items
that resolve to the kernel_ulong_t but that would arguably make the
code worse, inconsistent, less readable and require the same amount of
churn. Therefore, converting the tables first and using designated
initializers everywhere to begin with, before adding the union - as
proposed here - is the most sane and clean way forward, at least in my
opinion. Perhaps I should add this extra explanation and information
to the cover letters. Unless you meant something else.


_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to