From: Linus Walleij <linus.walleij@linaro.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] pinctrl: remove unneeded #ifdef around declarations
Date: Tue, 25 Jun 2019 10:52:40 +0200 [thread overview]
Message-ID: <CACRpkdb1MySnzCVGb6v1KovmgJtagKeSe+mrPvsVOJz_s198eA@mail.gmail.com> (raw)
In-Reply-To: <20190613015532.19685-1-yamada.masahiro@socionext.com>
Hi Masahiro,
thanks for your patch. For some reason I managed to pick up
patch 2 before patch 1. I applied this now with some fuzzing.
(Please check the result.)
On Thu, Jun 13, 2019 at 3:55 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> What is the point in surrounding the whole of declarations with
> ifdef like this?
I don't know if it is generally good to have phrases posed as
questions in a commit message, we prefer to have statements
about the change not a polemic dialog.
> #ifdef CONFIG_FOO
> int foo(void);
> #endif
>
> If CONFIG_FOO is not defined, all callers of foo() will fail
> with implicit declaration errors since the top Makefile adds
> -Werror-implicit-function-declaration to KBUILD_CFLAGS.
Maybe this flag was not in the top Makefile when the #ifdefs
where introduced?
> This breaks the build earlier when you are doing something wrong.
> That's it.
Good idea.
> Anyway, it will fail to link since the definition of foo() is not
> compiled.
>
> In summary, these ifdef are unneeded.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Pushing this to the zeroday builders and let's see what happens!
Yours,
Linus Walleij
next prev parent reply other threads:[~2019-06-25 8:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 1:55 [PATCH 1/2] pinctrl: remove unneeded #ifdef around declarations Masahiro Yamada
2019-06-13 1:55 ` [PATCH 2/2] pinctrl: make pinconf.h self-contained Masahiro Yamada
2019-06-18 11:45 ` Linus Walleij
2019-06-14 13:21 ` [PATCH 1/2] pinctrl: remove unneeded #ifdef around declarations Enrico Weigelt, metux IT consult
2019-06-14 14:59 ` Masahiro Yamada
2019-06-25 8:52 ` Linus Walleij [this message]
2019-06-27 0:59 ` Masahiro Yamada
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=CACRpkdb1MySnzCVGb6v1KovmgJtagKeSe+mrPvsVOJz_s198eA@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/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).