From: Joe Perches <joe@perches.com>
To: Doug Anderson <dianders@chromium.org>
Cc: LinusW <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpio: Make "offset" and "unsigned int", not just "unsigned"
Date: Tue, 28 Apr 2020 17:57:53 -0700 [thread overview]
Message-ID: <bc5c8165908facbb4781b2f29903dfacdf625e83.camel@perches.com> (raw)
In-Reply-To: <CAD=FV=Us6LyfgeXvxnqq+KhHN1djok1y+W_xzSb-KGFy2wgEMg@mail.gmail.com>
On Tue, 2020-04-28 at 17:50 -0700, Doug Anderson wrote:
> Hi,
>
> On Tue, Apr 28, 2020 at 5:38 PM Joe Perches <joe@perches.com> wrote:
> > On Tue, 2020-04-28 at 17:23 -0700, Douglas Anderson wrote:
> > > When I copied the function prototypes from the GPIO header file into
> > > my own driver, checkpatch yelled at me saying that I shouldn't use use
> > > "unsigned" but instead should say "unsigned int". Let's make the
> > > header file use "unsigned int" so others who copy like I did won't get
> > > yelled at.
> >
> > There are a few other unsigned declarations in the file.
>
> There are? I swear I looked for them before I sent my patch and I
> couldn't find them. Then I looked again upon seeing your reply and I
> still can't find them. My eyes are bad, though. Maybe you can give
> me specifics?
$ git grep -P -n '\bunsigned\s+(?!int|long)' include/linux/gpio/driver.h
include/linux/gpio/driver.h:352: unsigned offset);
include/linux/gpio/driver.h:354: unsigned offset);
include/linux/gpio/driver.h:356: unsigned offset);
include/linux/gpio/driver.h:358: unsigned offset);
include/linux/gpio/driver.h:360: unsigned offset, int value);
include/linux/gpio/driver.h:362: unsigned offset);
include/linux/gpio/driver.h:367: unsigned offset, int value);
include/linux/gpio/driver.h:372: unsigned offset,
include/linux/gpio/driver.h:375: unsigned offset);
include/linux/gpio/driver.h:462: unsigned offset);
include/linux/gpio/driver.h:660:int gpiochip_generic_request(struct gpio_chip *gc, unsigned offset);
include/linux/gpio/driver.h:661:void gpiochip_generic_free(struct gpio_chip *gc, unsigned offset);
include/linux/gpio/driver.h:662:int gpiochip_generic_config(struct gpio_chip *gc, unsigned offset,
> > Maybe do all of them (and remove the unnecessary externs)?
>
> You mean just remove the word "extern" everywhere in this file? Sure,
> I can if you want.
Up to the actual maintainers I suppose.
There are only a few extern function declarations.
Most do not use extern.
> > trivial reformatting of the function pointer block too
>
> Wow, I must be totally out of it. Maybe it's the gin and tonic I just
> had. I don't understand this comment either. Can you clarify?
int (*foo)(...,
...);
might be better with fewer tabs between return type and function pointer
int (*foo)(..., ...);
cheers, oe
next prev parent reply other threads:[~2020-04-29 0:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 0:23 [PATCH 1/2] gpio: Document proper return value for gpio drivers Douglas Anderson
2020-04-29 0:23 ` [PATCH 2/2] gpio: Make "offset" and "unsigned int", not just "unsigned" Douglas Anderson
2020-04-29 0:38 ` Joe Perches
2020-04-29 0:50 ` Doug Anderson
2020-04-29 0:57 ` Joe Perches [this message]
2020-04-29 1:04 ` Doug Anderson
2020-04-29 2:32 ` Joe Perches
2020-05-12 21:09 ` Andy Shevchenko
2020-04-29 12:19 ` Linus Walleij
2020-04-29 12:16 ` [PATCH 1/2] gpio: Document proper return value for gpio drivers 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=bc5c8165908facbb4781b2f29903dfacdf625e83.camel@perches.com \
--to=joe@perches.com \
--cc=bgolaszewski@baylibre.com \
--cc=dianders@chromium.org \
--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).