Linux IOMMU Development
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Robin Murphy <robin.murphy@arm.com>, joro@8bytes.org, will@kernel.org
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Use dev_iommu_ops() for probe_finalize
Date: Fri, 22 Apr 2022 20:57:31 +0800	[thread overview]
Message-ID: <2753cdef-4745-cb9c-b8db-6b336cd8082b@linux.intel.com> (raw)
In-Reply-To: <84b891ba40e4cea924ee4ea1167b00e87ad38b18.1650630616.git.robin.murphy@arm.com>

On 2022/4/22 20:33, Robin Murphy wrote:
> The ->probe_finalize hook only runs after ->probe_device succeeds,
> so we can move that over to the new dev_iommu_ops() as well.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu

> ---
> 
> Another cheeky little one which doesn't need to wait...
> 
>   drivers/iommu/iommu.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 1b8dcda5fbe4..8825a4628e46 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -315,7 +315,7 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
>   
>   int iommu_probe_device(struct device *dev)
>   {
> -	const struct iommu_ops *ops = dev->bus->iommu_ops;
> +	const struct iommu_ops *ops;
>   	struct iommu_group *group;
>   	int ret;
>   
> @@ -352,6 +352,7 @@ int iommu_probe_device(struct device *dev)
>   	mutex_unlock(&group->mutex);
>   	iommu_group_put(group);
>   
> +	ops = dev_iommu_ops(dev);
>   	if (ops->probe_finalize)
>   		ops->probe_finalize(dev);
>   
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

      reply	other threads:[~2022-04-22 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 12:33 [PATCH] iommu: Use dev_iommu_ops() for probe_finalize Robin Murphy
2022-04-22 12:57 ` Lu Baolu [this message]

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=2753cdef-4745-cb9c-b8db-6b336cd8082b@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --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