From: Robin Murphy <robin.murphy@arm.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Joerg Roedel <jroedel@suse.de>,
Lu Baolu <baolu.lu@linux.intel.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>
Subject: Re: [PATCH v1 1/1] iommu: Do not dereference fwnode in struct device
Date: Tue, 23 Aug 2022 16:12:25 +0100 [thread overview]
Message-ID: <f93497ce-7775-9c4c-db0d-714a0e5c5bc5@arm.com> (raw)
In-Reply-To: <20220801164758.20664-1-andriy.shevchenko@linux.intel.com>
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);
next prev parent reply other threads:[~2022-08-23 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 16:47 [PATCH v1 1/1] iommu: Do not dereference fwnode in struct device Andy Shevchenko
2022-08-23 14:08 ` Andy Shevchenko
2022-08-23 15:12 ` Robin Murphy [this message]
2022-09-07 8:37 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f93497ce-7775-9c4c-db0d-714a0e5c5bc5@arm.com \
--to=robin.murphy@arm.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox