Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error




* David Woodhouse <dwmw2@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
    ... depends on MTD ... select a component somewhere which then picks its dependencies. ... but to extend the Kconfig language to be ... drivers then do it like networking: ...
    (Linux-Kernel)
  • Re: Linux 2.6.26-rc1
    ... dependencies to A or select these dependencies by A. ... those main drivers supports a large number of different ... allows that the same driver to use different internal components. ... if you have a em28xx device with msp3400 and tvp5150 and another ...
    (Linux-Kernel)
  • Re: Linux 2.6.26-rc1
    ... Stefan Richter wrote: ... dependencies to A or select these dependencies by A. ... those main drivers supports a large number of different ... A "high-level driver" does not depend on "low-level drivers" and the low-level drivers' dependencies anymore. ...
    (Linux-Kernel)
  • Re: Starting a driver within a driver...
    ... on a lot of OS variants, the pnp enum ... internal function calls rather than more complex signaling methods. ... Can I do something with dependencies to ensure the OS starts device #1 ... Then the order in which the OS tells the drivers to start won't ...
    (microsoft.public.development.device.drivers)
  • Re: [GIT PATCHES] V4L/DVB fixes for 2.6.26
    ... Several drivers don't need INPUT. ... FW_LOADER to be a user-visible option with dependencies. ... It seems safe to select HOTPLUG instead of depending on it. ... I can't see any trouble on this approach. ...
    (Linux-Kernel)