linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Lianbo Jiang <lijiang@redhat.com>
Cc: linux-kernel@vger.kernel.org, thomas.lendacky@amd.com,
	will@kernel.org, iommu@lists.linux-foundation.org,
	robin.murphy@arm.com
Subject: Re: [PATCH 2/2 v2] iommu: use the __iommu_attach_device() directly for deferred attach
Date: Tue, 19 Jan 2021 15:29:39 +0000	[thread overview]
Message-ID: <20210119152939.GB3453587@infradead.org> (raw)
In-Reply-To: <20210119111616.12761-3-lijiang@redhat.com>

> +int iommu_do_deferred_attach(struct device *dev,
> +			     struct iommu_domain *domain)

I'd remove the "do_" from the name, it doesn't really add any value.

> +{
> +	const struct iommu_ops *ops = domain->ops;
> +
> +	if (unlikely(ops->is_attach_deferred &&
> +		     ops->is_attach_deferred(domain, dev)))
> +		return __iommu_attach_device(domain, dev);
> +
> +	return 0;

Now that everyting is under the static key we don't really need to
bother with the unlikely micro optimization, do we?

> +extern int iommu_do_deferred_attach(struct device *dev,
> +				    struct iommu_domain *domain);

No need for the extern.

  parent reply	other threads:[~2021-01-19 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 11:16 [PATCH 0/2 v2] iommu: fix the failure of deferred attach for iommu attach device Lianbo Jiang
2021-01-19 11:16 ` [PATCH 1/2 v2] dma-iommu: use static-key to minimize the impact in the fast-path Lianbo Jiang
2021-01-19 15:26   ` Christoph Hellwig
2021-01-19 15:52     ` Robin Murphy
2021-01-21 12:21     ` lijiang
2021-01-19 11:16 ` [PATCH 2/2 v2] iommu: use the __iommu_attach_device() directly for deferred attach Lianbo Jiang
2021-01-19 13:40   ` Robin Murphy
2021-01-19 15:29   ` Christoph Hellwig [this message]
2021-01-21 12:57     ` lijiang
2021-01-19 13:46 ` [PATCH 0/2 v2] iommu: fix the failure of deferred attach for iommu attach device Lu Baolu
2021-01-28 11:04 ` 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=20210119152939.GB3453587@infradead.org \
    --to=hch@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=lijiang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=thomas.lendacky@amd.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;
as well as URLs for NNTP newsgroup(s).