[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170210152254.GI7339@8bytes.org>
Date: Fri, 10 Feb 2017 16:22:54 +0100
From: Joerg Roedel <joro@...tes.org>
To: Robin Murphy <robin.murphy@....com>
Cc: Will Deacon <will.deacon@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Alex Williamson <alex.williamson@...hat.com>,
David Woodhouse <dwmw2@...radead.org>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface
Hi Robin,
On Fri, Feb 10, 2017 at 02:16:54PM +0000, Robin Murphy wrote:
> > +static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
> > + struct fwnode_handle *fwnode)
> > +{
> > + iommu->fwnode = fwnode;
> > +}
>
> Would it make sense to simply make the ops and fwnode additional
> arguments to iommu_device_register() (permitting fwnode to be NULL)?
> AFAICS they should typically all have the same effective lifetime so
> there doesn't seem to be any real need to handle everything separately.
Well, it is not yet clear what other information will end up in
'struct iommu_device', and I don't want to add another parameter to
iommu_device_register for every new struct member.
Also I think having these wrappers is more readable in the code, as it
is clear what the code does without looking up the function prototypes
in the header.
It might make sense to set the mandatory struct members via
iommu_device_register in the future, but we'll see :)
Joerg
Powered by blists - more mailing lists