lkml.org 
[lkml]   [2007]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] MTD: fix DOC2000/2001/2001PLUS build error

    * David Woodhouse <dwmw2@infradead.org> wrote:

    > On Mon, 2007-02-05 at 09:45 +0100, Ingo Molnar wrote:
    > > LD vmlinux
    > > drivers/built-in.o: In function `cafe_nand_remove':
    > > cafe.c:(.text+0x19277a): undefined reference to `nand_release'
    > > drivers/built-in.o: In function `cafe_nand_cmdfunc':
    > > cafe.c:(.text+0x193036): undefined reference to `nand_wait_ready'
    > > drivers/built-in.o: In function `cafe_nand_probe':
    > > cafe.c:(.text+0x19359e): undefined reference to `nand_scan_ident'
    > > cafe.c:(.text+0x193658): undefined reference to `nand_scan_tail'
    > > distcc[1703] ERROR: compile (null) on localhost failed
    > > make: *** [vmlinux] Error 1
    >
    > > so here's the fix for the 3 affected MTD drivers: DOC2000, DOC2001 and
    > > DOC2001PLUS.
    >
    > Er, what?
    >
    > For a start, the affected driver is the new CAFÉ NAND controller, not
    > the old versions of the DiskOnChip drivers which don't even use the
    > generic NAND code anyway.
    >
    > Secondly, please don't _ever_ use 'select'. [...]

    i only did the simple & minimal thing and extended the already existing
    select code that was there:

    tristate "M-Systems Disk-On-Chip 2000 and Millennium (DEPRECATED)"
    depends on MTD
    select MTD_DOCPROBE
    + select MTD_NAND
    select MTD_NAND_IDS
    ---help---

    feel free to get rid of the original selects there.

    > [...] If ESR's Aunt Tillie _really_ needs to configure a new kernel
    > for her $100 laptop, but she lacks the wit to realise that she might
    > need to ask for NAND flash support if she wants to be able to enable
    > the NAND flash controller, then I really couldn't care less.

    i agree and i disagree. I agree that sprinkling tons of selects all
    around the Kconfigs would be bad - a dependency should only be expressed
    once.

    But i disagree with your notion that it's somehow wrong to be able to
    select a component somewhere which then picks its dependencies. I think
    the right solution is not to be ambivalent towards the needs of aunts,
    but to extend the Kconfig language (and/or tools surrounding it) to be
    able to activate an inactive config entry by automatically selecting all
    its required dependencies. (just like package managers can do it on any
    modern distro)

    Furthermore, there's a solution already within the existing Kconfig
    language: the Kconfig hierarchy should be a tree alike hiearachy of
    dependencies, /not/ a generic, messy directed graph. In terms of Kconfig
    dependencies: if you need the NAND subsystem for certain types of
    drivers then do it like networking: collect those dependent drivers
    under CONFIG_NET_PCI, and make that whole category dependent on
    CONFIG_PCI. Not like the MTD code does it today: there's a
    "Self-contained MTD device drivers" category and a separate selectable
    CONFIG_MTD_NAND and there's a magic non-tree dependency between them.

    btw., this whole select problem is not limited to Aunt Tillie: in a
    couple of cases in the past few months when i saw some weird code in a
    driver and tried to enable it i had to search around for many minutes
    and enable random options to figure out its config dependencies until i
    had the driver truly enabled. (if there's some easy solution to this
    then i'm all ears - but i exclude the easiest solution of adding me to
    the 'aunt' category ;-) I think that by blaming Aunt Tillie you might be
    missing the real problem.

    Ingo
    -
    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/

    \
     
     \ /
      Last update: 2007-02-05 17:03    [W:0.029 / U:3.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site