Thread (39 messages) 39 messages, 5 authors, 2024-10-04

Re: [PATCH 06/14] Input: samsung-keypad - use guard notation to acquire mutex

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-08-23 06:06:23
Also in: linux-devicetree, linux-input, linux-samsung-soc, lkml

On 22/08/2024 20:07, Dmitry Torokhov wrote:
On Thu, Aug 22, 2024 at 05:48:33PM +0200, Krzysztof Kozlowski wrote:
quoted
On Sun, Aug 18, 2024 at 09:58:03PM -0700, Dmitry Torokhov wrote:
quoted
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@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
guard() is not in mutex.h and in general we are including headers for
the things directly used in the unit.
cleanup.h is included there.

If we want to list all the headers that we need instead of relying on
Fixing existing code is another thing. I only propose to add new code
with the header.

I don't have strong opinion anyway, so:

Reviewed-by: Krzysztof Kozlowski <redacted>

Best regards,
Krzysztof

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help