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

…
> +++ 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);


Regards,
Markus

  parent reply	other threads:[~2024-07-10 16:24 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 [this message]
2024-07-10 16:55     ` Lee Jones
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=493f3160-90be-4c02-a0d8-bedb630e5f1c@web.de \
    --to=markus.elfring@web.de \
    --cc=ansuelsmth@gmail.com \
    --cc=lee@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®