[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdb1MySnzCVGb6v1KovmgJtagKeSe+mrPvsVOJz_s198eA@mail.gmail.com>
Date: Tue, 25 Jun 2019 10:52:40 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] pinctrl: remove unneeded #ifdef around declarations
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@...ionext.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@...ionext.com>
Pushing this to the zeroday builders and let's see what happens!
Yours,
Linus Walleij
Powered by blists - more mailing lists