From: Erick Karanja <karanja99erick@gmail.com>
To: manivannan.sadhasivam@linaro.org, kw@linux.com
Cc: kishon@kernel.org, bhelgaas@google.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
julia.lawall@inria.fr, Erick Karanja <karanja99erick@gmail.com>
Subject: [PATCH 0/2] Use scoped_guard to safely manage mutex locking
Date: Thu, 1 May 2025 18:56:10 +0300 [thread overview]
Message-ID: <cover.1746114596.git.karanja99erick@gmail.com> (raw)
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
next reply other threads:[~2025-05-01 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 15:56 Erick Karanja [this message]
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
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=cover.1746114596.git.karanja99erick@gmail.com \
--to=karanja99erick@gmail.com \
--cc=bhelgaas@google.com \
--cc=julia.lawall@inria.fr \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.