linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: thierry.reding@gmail.com, joro@8bytes.org, vdumpa@nvidia.com,
	jonathanh@nvidia.com, linux-tegra@vger.kernel.org,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	hch@infradead.org
Subject: Re: [PATCH v4 2/2] iommu/tegra-smmu: Expand mutex protection range
Date: Tue, 29 Sep 2020 17:31:27 -0700	[thread overview]
Message-ID: <20200930003126.GA31332@Asurada-Nvidia> (raw)
In-Reply-To: <184163e9-01d4-dcc5-0adf-a3d175e56f16@gmail.com>

On Tue, Sep 29, 2020 at 08:42:52PM +0300, Dmitry Osipenko wrote:
> 29.09.2020 09:13, Nicolin Chen пишет:
> > This is used to protect potential race condition at use_count.
> > since probes of client drivers, calling attach_dev(), may run
> > concurrently.
> > 
> > Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> > ---
> 
> It's always better not to mix success and error code paths in order to
> keep code readable, but not a big deal in the case of this particular
> patch since the changed code is quite simple. Please try to avoid doing
> this in the future patches.
> 
> Also, please note that in general it's better to use locked/unlocked
> versions for the functions like it's already done for
> tegra_smmu_map/unmap, this will remove the need to maintain lockings in
> the code. The code touched by this patch doesn't have complicated code
> paths, so it's good enough to me.
> 
> Reviewed-by: Dmitry Osipenko <digetx@gmail.com>

Okay. Thanks for the review!

  reply	other threads:[~2020-09-30  0:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  6:13 [PATCH v4 0/2] iommu/tegra-smmu: Two followup changes Nicolin Chen
2020-09-29  6:13 ` [PATCH v4 1/2] iommu/tegra-smmu: Unwrap tegra_smmu_group_get Nicolin Chen
2020-09-29 17:41   ` Dmitry Osipenko
2020-10-03 14:27     ` Dmitry Osipenko
2020-10-08  9:55   ` Thierry Reding
2020-09-29  6:13 ` [PATCH v4 2/2] iommu/tegra-smmu: Expand mutex protection range Nicolin Chen
2020-09-29 17:42   ` Dmitry Osipenko
2020-09-30  0:31     ` Nicolin Chen [this message]
2020-10-03 14:28     ` Dmitry Osipenko
2020-10-08  9:56   ` Thierry Reding
2020-11-07  8:35 ` [PATCH v4 0/2] iommu/tegra-smmu: Two followup changes Nicolin Chen

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=20200930003126.GA31332@Asurada-Nvidia \
    --to=nicoleotsuka@gmail.com \
    --cc=digetx@gmail.com \
    --cc=hch@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    /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).