lkml.org 
[lkml]   [2017]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-02-10 17:12    [W:0.071 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site