Re: [PATCH v3 1/6] genirq/msi: Add cleanup guard define for msi_lock_descs()/msi_unlock_descs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux