lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/1] iommu: Do not dereference fwnode in struct device
On 01/08/2022 5:47 pm, Andy Shevchenko wrote:
> In order to make the underneath API easier to change in the future,
> prevent users from dereferencing fwnode from struct device.
> Instead, use the specific dev_fwnode() API for that.

Seems fair,

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/iommu/iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 780fb7071577..31b5f4ceb2e9 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -173,7 +173,7 @@ int iommu_device_register(struct iommu_device *iommu,
>
> iommu->ops = ops;
> if (hwdev)
> - iommu->fwnode = hwdev->fwnode;
> + iommu->fwnode = dev_fwnode(hwdev);
>
> spin_lock(&iommu_device_lock);
> list_add_tail(&iommu->list, &iommu_device_list);

\
 
 \ /
  Last update: 2022-08-23 19:37    [W:0.436 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site