[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATdKXX5fnNCrJEj9dLgew5f4geCKai5gOrTMWR=vYT0UA@mail.gmail.com>
Date: Tue, 28 Jun 2022 21:09:15 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Arnd Bergmann <arnd@...db.de>, Michal Marek <mmarek@...e.cz>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Mike Rapoport <rppt@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] kconfig: Add implicit CONFIG_ prefix to IS_ENABLED()
and co
On Tue, Jun 28, 2022 at 9:02 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Jun 28, 2022 at 01:19:17PM +0200, Arnd Bergmann wrote:
> > On Tue, Jun 28, 2022 at 11:56 AM Peter Zijlstra <peterz@...radead.org> wrote:
> > >
> > > Since IS_ENABLED() (and friends) are clearly meant to be used on
> > > CONFIG_foo symbols and IS_ENABLED(CONFIG_ is so long and almost an
> > > tautology, allow the more compact usage of: IS_ENABLED(foo).
> > >
> > > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> >
> > I'd prefer to keep the more verbose usage, mainly because it makes it easier
> > to grep for a symbol. If today you do 'git grep CONFIG_PM_SLEEP', you find
> > all instances in Makefile, in #ifdef and in IS_ENABLED(), though not the
> > references in Kconfig language, which leave out the prefix.
>
> Which is why I never grep for the CONFIG_ thing to begin with, it misses
> the Kconfig site.
>
> > If we remove the prefix for IS_ENABLED(), the same grep fails to get
> > all the results, while searching for the substring without the CONFIG_
> > prefix can end up finding false-positives by finding longer strings (e.g.
> > CONFIG_DEBUG_STACKOVERFLOW vs
> > CONFIG_HAVE_DEBUG_STACKOVERFLOW).
>
> Me being used to that doesn't consider that a real issue :-) I'd much
> rather have the somewhat shorter IS_ENABLED() things.
One more thing worth mentioning, this patch does
not even work correctly.
scripts/basic/fixdep.c searches for CONFIG_ prefix.
This works nicely, and there is no reason to lose this simplicity.
NACK.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists