lkml.org 
[lkml]   [2011]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kconfig: Only generate config_is_xxx for bool and tristate options
    On Wed, May 18, 2011 at 07:16:45AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
    > On 21:53 Tue 17 May , Sam Ravnborg wrote:
    > > On Tue, May 17, 2011 at 05:35:32PM +0200, Michal Marek wrote:
    > > > For strings and integers, the config_is_xxx macros are useless and
    > > > sometimes misleading:
    > > >
    > > > #define CONFIG_INITRAMFS_SOURCE ""
    > > > #define config_is_initramfs_source() 1
    > >
    > > I'm late with this comment....
    > > Could we introduce "config_is_foo" using a syntax that
    > > does not break grepability?
    > >
    > > Maybe a syntax like this?
    > >
    > > #ifdef CONFIG_FOO
    > >
    > > and
    > >
    > > if (KCONFIG_FOO())
    > >
    > > Grepping for the use of a symbol is a very typical thing,
    > > so we should try to keep this.
    > > And with the suggested syntax above I expect fixdep to
    > > catch up both usage types.
    > I'll prefer kconfig_foo()
    > not uppercase
    >
    > but if we use KCONFIG_FOO no need to touch fixdep

    fixdep is easy to fix - albeit it may cost a bit of processing time.
    wht I worry much more about is users that miss uses of CONFIG_ symbols, because
    they do not show up in "git grep CONFIG_FOO".

    Using "if (KCONFIG_FOO()) users are also awre this is a configuration
    decided condition - which is nice to stand out.

    Sam


    \
     
     \ /
      Last update: 2011-05-18 08:21    [W:0.023 / U:0.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site