All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
	linux-leds@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH 3/3] leds: leds-lp55xx: Convert mutex lock/unlock to guard API
Date: Wed, 10 Jul 2024 17:55:28 +0100	[thread overview]
Message-ID: <20240710165528.GH501857@google.com> (raw)
In-Reply-To: <493f3160-90be-4c02-a0d8-bedb630e5f1c@web.de>

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 [李琼斯]

  reply	other threads:[~2024-07-10 16:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 22:15 [PATCH 1/3] leds: leds-lp5569: Convert to sysfs_emit API Christian Marangi
2024-06-26 22:15 ` [PATCH 2/3] leds: leds-lp5523: " Christian Marangi
2024-06-26 22:15 ` [PATCH 3/3] leds: leds-lp55xx: Convert mutex lock/unlock to guard API Christian Marangi
2024-06-27  5:52   ` Markus Elfring
2024-06-27  7:08     ` Lee Jones
2024-06-27  7:09     ` Lee Jones
2024-06-27  8:12       ` [3/3] " Markus Elfring
2024-06-27  8:22         ` Lee Jones
2024-06-27  9:24           ` Markus Elfring
2024-07-10  7:10   ` [PATCH 3/3] " Lee Jones
2024-07-10 16:24   ` Markus Elfring
2024-07-10 16:55     ` Lee Jones [this message]
2024-07-10 10:29       ` Christian Marangi
2024-07-10 18:10         ` [3/3] " Markus Elfring
2024-07-11  8:08           ` Lee Jones
2024-07-11  8:05         ` [PATCH 3/3] " Lee Jones
2024-07-04 15:44 ` [PATCH 1/3] leds: leds-lp5569: Convert to sysfs_emit API Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240710165528.GH501857@google.com \
    --to=lee@kernel.org \
    --cc=Markus.Elfring@web.de \
    --cc=ansuelsmth@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.