linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: "Bamvor Jian Zhang" <bamv2005@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] gpio: mockup: add locking
Date: Tue, 20 Nov 2018 09:46:50 +0100	[thread overview]
Message-ID: <CACRpkdasK1UoNz34skdb+NbEE7SQuMhkij+xGW=Y6Pc5LF3AxQ@mail.gmail.com> (raw)
In-Reply-To: <CAMRc=Me9Ypsz_NH7j1K1TxR8u=9qF9opKPri10Jkn3G=_tdssg@mail.gmail.com>

On Mon, Nov 19, 2018 at 10:09 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> pt., 16 lis 2018 o 22:43 Linus Walleij <linus.walleij@linaro.org> napisał(a):

> > __gpio_*
> > I tend to dislike __underscore_notation because I feel it
> > is semantically ambguous. I prefer a proper name, even
> > to the point that I prefer inner_function_foo over __foo,
> > but it's your driver and I might be a bit grumpy. :)
>
> I think this is a common and intuitive pattern in the kernel codebase.
> Many subsystems and drivers use '__' to mark functions that execute
> internal logic and expect certain locks to be held etc.

You say it yourself: interpretation depends on context.

I might be especially stupid for being unable to discern
meaning from context in these cases and so what is
intuitive for some is just not intuitive for me.

Example:
set_bit() vs __set_bit()

Apparently some kernel developers think it is completely
obvious that the latter is the unlocked non-atomic version
of set_bit(). However I was confused for years with no
idea as to what the difference was.

Had it simply been named set_bit_nonatomic(), at the
cost of a few characters, confusion on my part would be
avoided and at least to me the world would be a better
place.

> If you don't mind, I'd like to leave it like this.

No big deal, keep it as is :)

Yours,
Linus Walleij

  reply	other threads:[~2018-11-20  8:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 16:52 [PATCH 0/3] gpio: mockup: misc updates Bartosz Golaszewski
2018-11-08 16:52 ` [PATCH 1/3] gpio: mockup: fix indicated direction Bartosz Golaszewski
2018-11-08 20:35   ` Uwe Kleine-König
2018-11-09 11:13     ` Bartosz Golaszewski
2018-11-09 11:54       ` Uwe Kleine-König
2018-11-09 12:24         ` Bartosz Golaszewski
2018-11-09 13:10           ` Uwe Kleine-König
2018-11-09 13:53             ` Bartosz Golaszewski
2018-11-09 14:39               ` Uwe Kleine-König
2018-11-09 15:24                 ` Bartosz Golaszewski
2018-11-09 17:03                   ` Uwe Kleine-König
2018-11-09 17:23                     ` Bartosz Golaszewski
2018-11-11 16:59                       ` Uwe Kleine-König
2018-11-12 14:14                         ` Bartosz Golaszewski
2018-11-13  6:57                           ` Uwe Kleine-König
2018-11-16 21:38   ` Linus Walleij
2018-11-08 16:52 ` [PATCH 2/3] gpio: mockup: add locking Bartosz Golaszewski
2018-11-08 21:13   ` Uwe Kleine-König
2018-11-16 21:43   ` Linus Walleij
2018-11-19  9:09     ` Bartosz Golaszewski
2018-11-20  8:46       ` Linus Walleij [this message]
2018-11-08 16:52 ` [PATCH 3/3] gpio: mockup: implement get_multiple() Bartosz Golaszewski
2018-11-08 20:36   ` Uwe Kleine-König
2018-11-16 21:44   ` Linus Walleij

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='CACRpkdasK1UoNz34skdb+NbEE7SQuMhkij+xGW=Y6Pc5LF3AxQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=bamv2005@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).