[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a83918f-6885-4766-9648-de88a7a99f07@kernel.org>
Date: Wed, 16 Oct 2024 10:12:50 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Frank Li <Frank.Li@....com>,
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>
Cc: linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
imx@...ts.linux.dev, Niklas Cassel <cassel@...nel.org>, maz@...nel.org,
tglx@...utronix.de, jdmason@...zu.us
Subject: Re: [PATCH v3 1/6] genirq/msi: Add cleanup guard define for
msi_lock_descs()/msi_unlock_descs()
On 10/16/24 7:07 AM, 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.
>
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
> include/linux/msi.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/msi.h b/include/linux/msi.h
> index b10093c4d00ea..0b6cb7f303887 100644
> --- a/include/linux/msi.h
> +++ b/include/linux/msi.h
> @@ -228,6 +228,8 @@ int msi_setup_device_data(struct device *dev);
> void msi_lock_descs(struct device *dev);
> void msi_unlock_descs(struct device *dev);
>
> +DEFINE_GUARD(msi_descs, struct device *, msi_lock_descs(_T), msi_unlock_descs(_T))
> +
This belongs with patch 3 since it is first used there.
> struct msi_desc *msi_domain_first_desc(struct device *dev, unsigned int domid,
> enum msi_desc_filter filter);
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists