From: Kent Gibson <warthog618@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
Andy Shevchenko <andy@kernel.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: Drop cargo-culted comment
Date: Sat, 25 Nov 2023 10:40:38 +0800 [thread overview]
Message-ID: <ZWFepm7ufLdl115j@rigel> (raw)
In-Reply-To: <20231125-dropcomment-v1-1-15800415aae0@linaro.org>
On Sat, Nov 25, 2023 at 12:25:47AM +0100, Linus Walleij wrote:
> This comment about the gpio_lock is just completely confusing and
> misleading. This refers to a gpio_desc that would in 2008 be used
> to hold the list of gpio_chips, but nowadays gpio_desc refers to
> descriptors of individual GPIO lines and this comment is completely
> unparseable. Delete it.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpio/gpiolib.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 95d2a7b2ea3e..1c47af866bf6 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -86,10 +86,6 @@ static struct bus_type gpio_bus_type = {
> */
> #define FASTPATH_NGPIO CONFIG_GPIOLIB_FASTPATH_LIMIT
>
> -/* gpio_lock prevents conflicts during gpio_desc[] table updates.
> - * While any GPIO is requested, its gpio_chip is not removable;
> - * each GPIO's "requested" flag serves as a lock and refcount.
> - */
Perhaps provide a comment as to what the gpio_lock DOES cover?
> DEFINE_SPINLOCK(gpio_lock);
>
> static DEFINE_MUTEX(gpio_lookup_lock);
>
> ---
> base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86
> change-id: 20231125-dropcomment-89e5b7b4cc3f
>
> Best regards,
> --
> Linus Walleij <linus.walleij@linaro.org>
>
next prev parent reply other threads:[~2023-11-25 2:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 23:25 [PATCH] gpiolib: Drop cargo-culted comment Linus Walleij
2023-11-25 2:40 ` Kent Gibson [this message]
2023-11-25 23:05 ` Linus Walleij
2023-11-26 0:14 ` Kent Gibson
2023-11-27 19:44 ` Bartosz Golaszewski
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=ZWFepm7ufLdl115j@rigel \
--to=warthog618@gmail.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.