Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] Use scoped_guard to safely manage mutex locking
@ 2025-05-01 15:56 Erick Karanja
  2025-05-01 15:56 ` [PATCH 1/2] PCI: endpoint: Replace manual mutex handling with scoped_guard() Erick Karanja
  2025-05-01 15:56 ` [PATCH 2/2] PCI: endpoint: Use scoped_guard for manual mutex lock/unlock Erick Karanja
  0 siblings, 2 replies; 5+ messages in thread
From: Erick Karanja @ 2025-05-01 15:56 UTC (permalink / raw)
  To: manivannan.sadhasivam, kw
  Cc: kishon, bhelgaas, linux-pci, linux-kernel, julia.lawall,
	Erick Karanja

This change replaces manual mutex locking/unlocking with scoped_guard
to ensure mutexes are always released safely, even in the presence of
early returns or errors. It simplifies control flow and eliminates the
need for explicit goto-based cleanup blocks.

Erick Karanja (2):
  PCI: endpoint: Replace manual mutex handling with scoped_guard()
  PCI: endpoint: Use scoped_guard for manual mutex lock/unlock

 drivers/pci/endpoint/functions/pci-epf-mhi.c | 358 +++++++++----------
 drivers/pci/endpoint/pci-epc-core.c          |  53 ++-
 2 files changed, 190 insertions(+), 221 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-02  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-01 15:56 [PATCH 0/2] Use scoped_guard to safely manage mutex locking Erick Karanja
2025-05-01 15:56 ` [PATCH 1/2] PCI: endpoint: Replace manual mutex handling with scoped_guard() Erick Karanja
2025-05-02  8:41   ` Jonathan Cameron
2025-05-01 15:56 ` [PATCH 2/2] PCI: endpoint: Use scoped_guard for manual mutex lock/unlock Erick Karanja
2025-05-02  8:43   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox