[PATCH 0/2] staging: rtl8723bs: modernize locking with cleanup.h

Samrudh Nelli posted 2 patches 1 month ago
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 154 ++++++++-----------
1 file changed, 64 insertions(+), 90 deletions(-)
[PATCH 0/2] staging: rtl8723bs: modernize locking with cleanup.h
Posted by Samrudh Nelli 1 month ago
This series modernizes the mutex locking in rtw_pwrctrl.c by utilizing 
the guard() and scoped_guard() macros introduced in cleanup.h.

Patch 1 converts functions where the lock is held until returning.
Patch 2 converts functions where the lock is dropped mid-execution.

Samrudh Nelli (2):
  staging: rtl8723bs: use guard(mutex) to simplify locking
  staging: rtl8723bs: use scoped_guard() for mid-function locking

 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 154 ++++++++-----------
 1 file changed, 64 insertions(+), 90 deletions(-)

-- 
2.55.0
Re: [PATCH 0/2] staging: rtl8723bs: modernize locking with cleanup.h
Posted by Dan Carpenter 1 month ago
On Sat, Aug 22, 2026 at 11:53:45PM +0530, Samrudh Nelli wrote:
> This series modernizes the mutex locking in rtw_pwrctrl.c by utilizing 
> the guard() and scoped_guard() macros introduced in cleanup.h.
> 
> Patch 1 converts functions where the lock is held until returning.
> Patch 2 converts functions where the lock is dropped mid-execution.
> 
> Samrudh Nelli (2):
>   staging: rtl8723bs: use guard(mutex) to simplify locking
>   staging: rtl8723bs: use scoped_guard() for mid-function locking

We're not doing this sort of change to existing code unless it's part
of a bugfix.  It's just a lot of churn.

regards,
dan carpenter