Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1578550
| From | Joerg Roedel <joro@8bytes.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface |
| Date | 2017-02-10 16:30 +0100 |
| Message-ID | <t9lj3-5a6-7@gated-at.bofh.it> (permalink) |
| References | <t8VeW-5zl-27@gated-at.bofh.it> <t8XgK-6Nm-19@gated-at.bofh.it> <t9kdj-4sU-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11 v3] Let IOMMU core know about individual IOMMUs Joerg Roedel <joro@8bytes.org> - 2017-02-09 12:50 +0100
[PATCH 02/11] iommu: Rename struct iommu_device Joerg Roedel <joro@8bytes.org> - 2017-02-09 12:50 +0100
[PATCH 08/11] iommu/msm: Make use of iommu_device_register interface Joerg Roedel <joro@8bytes.org> - 2017-02-09 12:50 +0100
Re: [PATCH 08/11] iommu/msm: Make use of iommu_device_register interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 15:40 +0100
Re: [PATCH 08/11] iommu/msm: Make use of iommu_device_register interface Joerg Roedel <joro@8bytes.org> - 2017-02-10 17:00 +0100
Re: [PATCH 08/11] iommu/msm: Make use of iommu_device_register interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 18:40 +0100
[PATCH 05/11] iommu: Make iommu_device_link/unlink take a struct iommu_device Joerg Roedel <joro@8bytes.org> - 2017-02-09 13:40 +0100
[PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface Joerg Roedel <joro@8bytes.org> - 2017-02-09 13:40 +0100
Re: [PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 15:30 +0100
Re: [PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface Joerg Roedel <joro@8bytes.org> - 2017-02-10 16:40 +0100
Re: [PATCH 07/11] iommu/arm-smmu: Make use of the iommu_register interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 18:10 +0100
[PATCH 04/11] iommu: Add sysfs bindings for struct iommu_device Joerg Roedel <joro@8bytes.org> - 2017-02-09 14:50 +0100
[PATCH 03/11] iommu: Introduce new 'struct iommu_device' Joerg Roedel <joro@8bytes.org> - 2017-02-09 14:50 +0100
Re: [PATCH 03/11] iommu: Introduce new 'struct iommu_device' kbuild test robot <lkp@intel.com> - 2017-02-09 21:50 +0100
[PATCH 09/11] iommu/mediatek: Make use of iommu_device_register interface Joerg Roedel <joro@8bytes.org> - 2017-02-09 14:50 +0100
[PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Joerg Roedel <joro@8bytes.org> - 2017-02-09 14:50 +0100
Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 15:20 +0100
Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Joerg Roedel <joro@8bytes.org> - 2017-02-10 16:30 +0100
Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 17:10 +0100
Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Joerg Roedel <jroedel@suse.de> - 2017-02-10 17:20 +0100
Re: [PATCH 06/11] iommu: Add iommu_device_set_fwnode() interface Robin Murphy <robin.murphy@arm.com> - 2017-02-10 18:10 +0100
[PATCH 01/11] iommu: Rename iommu_get_instance() Joerg Roedel <joro@8bytes.org> - 2017-02-09 14:50 +0100
Re: [PATCH 01/11] iommu: Rename iommu_get_instance() Robin Murphy <robin.murphy@arm.com> - 2017-02-10 15:20 +0100
Re: [PATCH 01/11] iommu: Rename iommu_get_instance() Joerg Roedel <joro@8bytes.org> - 2017-02-10 16:40 +0100
csiph-web