[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zw/qwDLN0oCMEKJk@lizhi-Precision-Tower-5810>
Date: Wed, 16 Oct 2024 12:33:04 -0400
From: Frank Li <Frank.li@....com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
imx@...ts.linux.dev, Niklas Cassel <cassel@...nel.org>,
dlemoal@...nel.org, maz@...nel.org, jdmason@...zu.us
Subject: Re: [PATCH v3 1/6] genirq/msi: Add cleanup guard define for
msi_lock_descs()/msi_unlock_descs()
On Wed, Oct 16, 2024 at 06:21:50PM +0200, Thomas Gleixner wrote:
> On Tue, Oct 15 2024 at 18:07, Frank Li wrote:
>
> > Add a cleanup DEFINE_GUARD macro for msi_lock_descs() and
> > msi_unlock_descs() to simplify lock and unlock operations in error
> > path.
>
> What for?
See [PATCH v3 3/6] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller
scoped_guard(msi_descs, dev)
msi_for_each_desc(desc, dev, MSI_DESC_ALL) {
...
if (...)
goto ...
}
So cleanup can simplify unlock at error branch.
Frank
>
> Thanks,
>
> tglx
Powered by blists - more mailing lists