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: Sun, 26 Nov 2023 08:14:00 +0800 [thread overview]
Message-ID: <ZWKNyFOU65IHND1k@rigel> (raw)
In-Reply-To: <CACRpkdZvwePEaRVQLafD8KmiOENgEGFFDBXGPqS5_WLzNi2_yA@mail.gmail.com>
On Sun, Nov 26, 2023 at 12:05:08AM +0100, Linus Walleij wrote:
> On Sat, Nov 25, 2023 at 3:40 AM Kent Gibson <warthog618@gmail.com> wrote:
> > On Sat, Nov 25, 2023 at 12:25:47AM +0100, Linus Walleij wrote:
>
> > > -/* 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?
>
> Normally yes, but Bartosz just said he is going to replace this spinlock
> with a mutex so it's better if he adds it then.
>
If that is happening soon then leave it to Bart to change both the
comment and lock.
If not, then we now have an undocumented lock. If the coverage of the
spinlock and proposed mutex are the same why not describe what the lock
covers now? Then Bart wont have to update the comment.
Cheers,
Kent.
next prev parent reply other threads:[~2023-11-26 0:14 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
2023-11-25 23:05 ` Linus Walleij
2023-11-26 0:14 ` Kent Gibson [this message]
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=ZWKNyFOU65IHND1k@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).