[PATCH 06/14] Input: samsung-keypad - use guard notation to acquire mutex
Dmitry Torokhov
dmitry.torokhov at gmail.com
Thu Aug 22 11:07:37 PDT 2024
On Thu, Aug 22, 2024 at 05:48:33PM +0200, Krzysztof Kozlowski wrote:
> On Sun, Aug 18, 2024 at 09:58:03PM -0700, Dmitry Torokhov wrote:
> > Guard notation is more compact and ensures that the mutex will be
> > released when control leaves the function.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>
> > ---
> > drivers/input/keyboard/samsung-keypad.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
>
> You need to include cleanup.h (unless some other patch already did it
> and I missed it?)
Guard for mutexes defined in mutex.h which is pulled in indirectly, and
cleanup.h is included there.
If we want to list all the headers that we need instead of relying on
indirect inclusions I think we need a separate patch. But even then I
wonder if things like cleanup.h should be included by drivers
directly...
Thanks.
--
Dmitry
More information about the linux-arm-kernel
mailing list