[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240710165528.GH501857@google.com>
Date: Wed, 10 Jul 2024 17:55:28 +0100
From: Lee Jones <lee@...nel.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Christian Marangi <ansuelsmth@...il.com>, linux-leds@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>
Subject: Re: [PATCH 3/3] leds: leds-lp55xx: Convert mutex lock/unlock to
guard API
On Wed, 10 Jul 2024, Markus Elfring wrote:
> …
> > +++ b/drivers/leds/leds-lp5521.c
> …
> > @@ -185,9 +186,9 @@ static ssize_t lp5521_selftest(struct device *dev,
> > struct lp55xx_chip *chip = led->chip;
> > int ret;
> >
> > - mutex_lock(&chip->lock);
> > + guard(mutex, &chip->lock);
>
> How did you come to the conclusion to try such a syntax variant out?
>
> Would the following statement (with additional parentheses) be more appropriate?
>
> guard(mutex)(&chip->lock);
Yes, that's the fix.
I'm more concerned with how untested patches came to being submitted.
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists