From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"will@kernel.org" <will@kernel.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xueshuai@linux.alibaba.com" <xueshuai@linux.alibaba.com>
Subject: Re: [PATCH rc v6] iommu: Fix nested pci_dev_reset_iommu_prepare/done()
Date: Tue, 21 Apr 2026 11:00:01 -0700 [thread overview]
Message-ID: <aee7IVAXyoppm6tI@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB5276A8A765CAAD7A5C3B20AD8C2C2@BN9PR11MB5276.namprd11.prod.outlook.com>
On Tue, Apr 21, 2026 at 06:58:56AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Saturday, April 18, 2026 5:45 AM
> >
> > On Fri, Apr 17, 2026 at 08:24:27AM +0000, Tian, Kevin wrote:
> > > the last one is trivial that goto and guard() shouldn't be mixed in one
> > > function according to the cleanup guidelines.
> >
> > I don't think this is mixing. The guard is protecting the entire
> > routine including those goto paths. So there isn't any goto path
> > that is outside the mutex.
> >
>
> Here is what cleanup.h says:
>
> * Lastly, given that the benefit of cleanup helpers is removal of
> * "goto", and that the "goto" statement can jump between scopes, the
> * expectation is that usage of "goto" and cleanup helpers is never
> * mixed in the same function. I.e. for a given routine, convert all
> * resources that need a "goto" cleanup to scope-based cleanup, or
> * convert none of them.
OK. Let me fix this in v8.
Nicolin
prev parent reply other threads:[~2026-04-21 18:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 19:46 [PATCH rc v6] iommu: Fix nested pci_dev_reset_iommu_prepare/done() Nicolin Chen
2026-04-14 14:20 ` Jason Gunthorpe
2026-04-16 7:48 ` Shuai Xue
2026-04-17 8:24 ` Tian, Kevin
2026-04-17 21:44 ` Nicolin Chen
2026-04-18 4:56 ` Nicolin Chen
2026-04-21 7:01 ` Tian, Kevin
2026-04-21 17:43 ` Nicolin Chen
2026-04-21 6:58 ` Tian, Kevin
2026-04-21 18:00 ` Nicolin Chen [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=aee7IVAXyoppm6tI@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.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