lkml.org 
[lkml]   [2019]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] checkpatch: avoid default n
    From
    Date
    On Wed, 2019-07-03 at 01:42 -0700, Joe Perches wrote:
    > On Wed, 2019-07-03 at 16:30 +0800, Miles Chen wrote:
    > > This change reports a warning when "default n" is used.
    > >
    > > I have seen several "remove default n" patches, so I think
    > > it might be helpful to add this test in checkpatch.
    > >
    > > tested:
    > > WARNING: 'default n' is the default value, no need to write it explicitly.
    > > + default n
    >
    > I don't think this is reasonable as there are
    > several uses like:
    >
    > default y
    > default n if <foo>
    >
    > For instance:
    >
    > arch/alpha/Kconfig-config ALPHA_WTINT
    > arch/alpha/Kconfig- bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC
    > arch/alpha/Kconfig- default y if ALPHA_QEMU
    > arch/alpha/Kconfig: default n if ALPHA_EV5 || ALPHA_EV56 || (ALPHA_EV4 && !ALPHA_LCA)
    > arch/alpha/Kconfig: default n if !ALPHA_SRM && !ALPHA_GENERIC

    I've sent similar patch in 2016, my version won't complain about these.

    https://lkml.org/lkml/2016/4/22/580

    Joe.C

    \
     
     \ /
      Last update: 2019-07-03 10:59    [W:4.683 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site