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