lkml.org 
[lkml]   [2021]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] staging: r8188eu: Use a Mutex instead of a binary Semaphore
Date
On Friday, October 22, 2021 7:52:33 PM CEST Larry Finger wrote:
> On 10/22/21 12:19, Fabio M. De Francesco wrote:
> > Use a Mutex instead of a binary Semaphore for the purpose of enforcing
> > mutual exclusive access to the "pwrctrl_priv" structure.
> >
> > Mutexes are sleeping locks similar to Semaphores with a 'count' of one
> > (like binary Semaphores), however they have a simpler interface, more
> > efficient performance, and additional constraints.
> >
> > There is no change in the logic of the new code; however it is more
> > simple because it gets rid of four unnecessary wrappers:
> > _init_pwrlock(), _enter_pwrlock(),_exit_pwrlock(), _rtw_down_sema().
> >
> > Actually, there is a change in the state in which the code waits for
> > acquiring locks, because it makes it in an uninterruptible state
> > (instead the old code used down_interruptible()). Interruptible
> > waits are neither required nor wanted in this driver.
> >
> > Tested with ASUSTek Computer, Inc. Realtek 8188EUS [USB-N10 Nano].
> >
> > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
>
> Well done.
>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
>
Hi Larry,

Thank you very much for giving your "Acked-by" tag, and, above all, for the
"Well done".

Best regards,

Fabio



\
 
 \ /
  Last update: 2021-10-23 16:04    [W:0.041 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site