linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: "Frank Li" <Frank.Li@nxp.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	imx@lists.linux.dev, Niklas Cassel <cassel@kernel.org>,
	maz@kernel.org, tglx@linutronix.de, jdmason@kudzu.us
Subject: Re: [PATCH v3 1/6] genirq/msi: Add cleanup guard define for msi_lock_descs()/msi_unlock_descs()
Date: Wed, 16 Oct 2024 10:12:50 +0900	[thread overview]
Message-ID: <8a83918f-6885-4766-9648-de88a7a99f07@kernel.org> (raw)
In-Reply-To: <20241015-ep-msi-v3-1-cedc89a16c1a@nxp.com>

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@nxp.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

  reply	other threads:[~2024-10-16  1:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 22:07 [PATCH v3 0/6] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Frank Li
2024-10-15 22:07 ` [PATCH v3 1/6] genirq/msi: Add cleanup guard define for msi_lock_descs()/msi_unlock_descs() Frank Li
2024-10-16  1:12   ` Damien Le Moal [this message]
2024-10-16 16:21   ` Thomas Gleixner
2024-10-16 16:33     ` Frank Li
2024-10-15 22:07 ` [PATCH v3 2/6] PCI: endpoint: Add pci_epc_get_fn() API for customizable filtering Frank Li
2024-10-15 22:07 ` [PATCH v3 3/6] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller Frank Li
2024-10-16  1:36   ` Damien Le Moal
2024-10-16 15:03     ` Frank Li
2024-10-16 16:30   ` Thomas Gleixner
2024-10-16 16:54     ` Frank Li
2024-10-16 17:35       ` Thomas Gleixner
2024-10-15 22:07 ` [PATCH v3 4/6] PCI: endpoint: pci-epf-test: Add doorbell test support Frank Li
2024-10-18 14:01   ` Niklas Cassel
2024-10-18 14:05     ` Niklas Cassel
2024-10-18 15:13     ` Frank Li
2024-10-20 14:41       ` Niklas Cassel
2024-10-21  6:55         ` Niklas Cassel
2024-10-21 16:17           ` Frank Li
2024-10-15 22:07 ` [PATCH v3 5/6] misc: pci_endpoint_test: Add doorbell test case Frank Li
2024-10-15 22:07 ` [PATCH v3 6/6] tools: PCI: Add 'B' option for test doorbell Frank Li

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=8a83918f-6885-4766-9648-de88a7a99f07@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=jdmason@kudzu.us \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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).