Re: Surprising Kconfig depends semantics

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/08/03

  • Next message: Michael Frank: "Dumb question - why is dmesg interleaved with rc.sysinit logs in messages?"
    Date:	Fri, 8 Aug 2003 20:30:21 +0200
    To: Roman Zippel <zippel@linux-m68k.org>
    
    

    On Fri, Aug 08, 2003 at 05:13:48PM +0200, Roman Zippel wrote:

    > Hi,

    Hi Roman,

    > On Fri, 8 Aug 2003, Adrian Bunk wrote:
    >
    > > CONFIG_SERIO=m with CONFIG_KEYBOARD_ATKBD=y shouldn't be a valid
    > > combination.
    > >
    > > The correct solution is most likely a
    > > default y if INPUT=y && INPUT_KEYBOARD=y && SERIO=y
    > > default m if INPUT!=n && INPUT_KEYBOARD!=n && SERIO!=n
    >
    > This is probably the easiest solution:
    >
    > default INPUT_KEYBOARD && SERIO
    >
    > (INPUT_KEYBOARD already depends on INPUT)

    I'll send a
      default INPUT && INPUT_KEYBOARD && SERIO
    patch (to address the things James said, in any cases it doesn't do any
    harm).

    But it stays strange that a default can assign a value that isn't
    allowed by the depends, and you therefore have to write the depends
    twice in this case:

    config KEYBOARD_ATKBD
            tristate "AT keyboard support" if EMBEDDED || !X86
            default INPUT && INPUT_KEYBOARD && SERIO
            depends on INPUT && INPUT_KEYBOARD && SERIO

    > > The semantics that in
    > >
    > > config FOO
    > > tristate
    > > default y if BAR
    > >
    > > FOO will be set to y if BAR=m is a bit surprising.
    >
    > Why?

    On a first thought I'd have expected it to be equivalent to
      default y if BAR=y

    > bye, Roman

    cu
    Adrian

    -- 
           "Is there not promise of rain?" Ling Tan asked suddenly out
            of the darkness. There had been need of rain for many days.
           "Only a promise," Lao Er said.
                                           Pearl S. Buck - Dragon Seed
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Michael Frank: "Dumb question - why is dmesg interleaved with rc.sysinit logs in messages?"

    Relevant Pages

    • Re: Surprising Kconfig depends semantics
      ... This is probably the easiest solution: ... > config FOO ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Surprising Kconfig depends semantics
      ... config KEYBOARD_ATKBD ... config FOO ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] [request for inclusion] Realtime LSM
      ... >> And as I mentioned a few times, the authors have neither the inclination ... >> nor the ability to do that, because they are not kernel hackers. ... >> correct solution from the kernel POV. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Fix allnoconfig build with gcc4
      ... > simply removing the offending line is. ... this would cause a compile error if CONFIG_NET and CONFIG_SYSCTL is ... So the correct solution is apparently either one of ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • mips SMBUS_PSC_BASE compile errors
      ... places seem to be the correct solution, but I don't understand the mips ... subarch setup good enough for knowing where to place them. ... There had been need of rain for many days. ...
      (Linux-Kernel)