Message ID | 12-v1-5f734af130a3+34f-iommu_fwspec_jgg@nvidia.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Solve iommu probe races around iommu_fwspec | expand |
Hi Jason, On Fri, 2023-11-03 at 13:44 -0300, Jason Gunthorpe wrote: > There are no external callers now. > > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> > --- > drivers/iommu/iommu.c | 3 ++- > include/linux/iommu.h | 6 ------ > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 62c82a28cd5db3..becd1b881e62dc 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -2945,7 +2945,8 @@ bool iommu_default_passthrough(void) > } > EXPORT_SYMBOL_GPL(iommu_default_passthrough); > > -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle > *fwnode) > +static const struct iommu_ops * > +iommu_ops_from_fwnode(struct fwnode_handle *fwnode) > { > const struct iommu_ops *ops = NULL; > struct iommu_device *iommu; > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 27e4605d498850..37948eee8d7394 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -701,7 +701,6 @@ static inline void iommu_fwspec_free(struct > device *dev) > dev->iommu->fwspec = NULL; > } > int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids); > -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle > *fwnode); > int iommu_fwspec_append_ids(struct iommu_fwspec *fwspec, u32 *ids, > int num_ids); > > static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct > device *dev) > @@ -1044,11 +1043,6 @@ static inline int iommu_fwspec_add_ids(struct > device *dev, u32 *ids, > } > > static inline > -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle > *fwnode) > -{ > - return NULL; > -} > - > static inline int > iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features > feat) This leaves the extra line with 'static inline', it should also be removed. Cheers, Andre'
On Fri, Nov 03, 2023 at 01:44:57PM -0300, Jason Gunthorpe wrote: ... > @@ -1044,11 +1043,6 @@ static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, > } > > static inline ^ was missed in the deletion below > -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode) > -{ > - return NULL; > -} > - > static inline int > iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat) > { > -- > 2.42.0 >
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 62c82a28cd5db3..becd1b881e62dc 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2945,7 +2945,8 @@ bool iommu_default_passthrough(void) } EXPORT_SYMBOL_GPL(iommu_default_passthrough); -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode) +static const struct iommu_ops * +iommu_ops_from_fwnode(struct fwnode_handle *fwnode) { const struct iommu_ops *ops = NULL; struct iommu_device *iommu; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 27e4605d498850..37948eee8d7394 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -701,7 +701,6 @@ static inline void iommu_fwspec_free(struct device *dev) dev->iommu->fwspec = NULL; } int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids); -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode); int iommu_fwspec_append_ids(struct iommu_fwspec *fwspec, u32 *ids, int num_ids); static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) @@ -1044,11 +1043,6 @@ static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, } static inline -const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode) -{ - return NULL; -} - static inline int iommu_dev_enable_feature(struct device *dev, enum iommu_dev_features feat) {
There are no external callers now. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> --- drivers/iommu/iommu.c | 3 ++- include/linux/iommu.h | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-)