Messages in this thread | | | Date | Fri, 10 Feb 2017 17:11:22 +0100 | From | Joerg Roedel <> | Subject | Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface |
| |
On Fri, Feb 10, 2017 at 04:03:07PM +0000, Robin Murphy wrote: > Yeah, on reflection explicit initialisation is certainly easier to read > than a bunch of arguments handled implicitly by register(), but then > from that angle, even more clear would be to simply have the drivers > write the relevant struct members directly - I'd be quite happy with > that, and we then don't have to add another setter to iommu.h for every > new struct member (and risk it looking like Java code...)
Yeah, that was my first approach. But there is the Intel VT-d anomaly, where a part of the driver can be built-in (dmar.c) with CONFIG_IOMMU_API=N. In this case 'struct iommu_device' is empty, and trying to access the members directly doesn't compile anymore.
I have to look if this anomaly could be removed, then it is probably the best to set the struct members directly without wrapper functions.
Joerg
| |