LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
Date: Mon, 5 Feb 2007 16:56:27 +0100	[thread overview]
Message-ID: <20070205155627.GA8354@elte.hu> (raw)
In-Reply-To: <1170682488.29759.795.camel@pmac.infradead.org>


* 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

  reply	other threads:[~2007-02-05 16:00 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-04 19:10 Super Kernel Sunday! Linus Torvalds
2007-02-04 19:40 ` Bauke Jan Douma
2007-02-04 21:00   ` Gene Heskett
2007-02-04 21:11   ` Kevin K
2007-02-04 19:56 ` Alessandro Suardi
2007-02-05  8:39 ` Jonathan Sambrook
2007-02-05  8:45 ` [patch] MTD: fix DOC2000/2001/2001PLUS build error Ingo Molnar
2007-02-05 13:06   ` Josh Boyer
2007-02-05 13:34   ` David Woodhouse
2007-02-05 15:56     ` Ingo Molnar [this message]
2007-02-05 16:08       ` Arjan van de Ven
2007-02-05 16:12       ` Russell King
2007-02-05 16:17         ` Ingo Molnar
2007-02-05 16:22       ` David Woodhouse
2007-02-05 16:26         ` Ingo Molnar
2007-02-05 16:31           ` Ingo Molnar
2007-02-05 16:58             ` Linus Torvalds
2007-02-05 17:05               ` Ingo Molnar
2007-02-05 17:08               ` Russell King
2007-02-05 21:15               ` Ingo Oeser
2007-02-06 13:32                 ` Gerhard Mack
2007-02-05 21:17               ` David Woodhouse
2007-02-05 21:28                 ` Linus Torvalds
2007-02-05 21:39                   ` David Woodhouse
2007-02-05 21:49                     ` Linus Torvalds
2007-02-05 21:53                       ` David Woodhouse
2007-02-05 22:21                         ` Linus Torvalds
2007-02-05 22:31                           ` Randy Dunlap
2007-02-05 23:09                             ` Linus Torvalds
2007-02-05 23:21                               ` David Woodhouse
2007-02-05 23:32                                 ` Linus Torvalds
2007-02-06  0:04                                   ` Mark Rustad
2007-02-06 15:55                                     ` Bill Davidsen
2007-02-06 16:20                                       ` Mark Rustad
2007-02-06  9:45                                   ` David Woodhouse
2007-02-06 15:51                                     ` Bill Davidsen
2007-02-06 16:53                                     ` Linus Torvalds
2007-02-06 22:38                                       ` David Woodhouse
2007-02-06 22:39                                         ` Randy Dunlap
2007-02-06 23:11                                           ` Linus Torvalds
2007-02-06 23:15                                             ` Linus Torvalds
2007-02-06 23:18                                             ` David Woodhouse
2007-02-06 23:49                                               ` Linus Torvalds
2007-02-06 22:53                                         ` Linus Torvalds
2007-02-06 23:11                                           ` David Woodhouse
2007-02-06 23:28                                             ` Linus Torvalds
2007-02-06 23:36                                               ` David Woodhouse
2007-02-06 23:41                                                 ` Randy Dunlap
2007-02-06 23:49                                                   ` David Woodhouse
2007-02-06 23:52                                                   ` Robert P. J. Day
2007-02-06 23:55                                                 ` Linus Torvalds
2007-02-07  0:03                                                   ` David Woodhouse
2007-02-07  0:21                                                     ` Linus Torvalds
2007-02-07  0:30                                                       ` Randy Dunlap
2007-02-07  0:37                                                       ` David Woodhouse
2007-02-07  2:09                                                         ` Linus Torvalds
2007-02-07 13:51                                                       ` Sunil Naidu
2007-02-06  1:09                                 ` Theodore Tso
2007-02-06  6:09                                   ` Matt Mackall
2007-02-06 16:04                                     ` Bill Davidsen
2007-02-06 16:41                                       ` Matt Mackall
2007-02-06 18:03                                         ` Bill Davidsen
2007-02-06  0:00                               ` Jeff Garzik
2007-02-06 13:52                               ` Jörn Engel
2007-02-06 15:16                               ` Mark Lord
2007-02-08  8:18                                 ` David Lang
2007-02-08  9:44                                 ` Jörn Engel
2007-02-06 15:41                           ` Bill Davidsen
2007-02-05 22:21                       ` Alan
2007-02-05 22:35                         ` Linus Torvalds
2007-02-05 21:50                 ` Alan
2007-02-05 21:41                   ` David Woodhouse
2007-02-06  5:46                 ` Matt Mackall
2007-02-06 15:34                   ` Paul Mundt
2007-02-06 22:39                   ` Haavard Skinnemoen
2007-02-06 22:51                     ` Linus Torvalds
2007-02-05 16:33           ` David Woodhouse
2007-02-05 16:46           ` Russell King
2007-02-05 16:52             ` Ingo Molnar
2007-02-05 17:04               ` Russell King
2007-02-05 16:32     ` Linus Torvalds
2007-02-05 16:50       ` Russell King
2007-02-05 16:52       ` David Woodhouse
2007-02-05 17:58 ` Super Kernel Sunday! Jan Engelhardt
2007-02-05 18:07   ` Kevin Fox
2007-02-06 19:02   ` Stephen Hemminger
2007-02-05 21:27 ` [2.6.20] Regression in dmfe driver Thomas Bächler
2007-02-06  9:38   ` Thierry Vignaud
2007-02-06 22:40     ` Thomas Bächler
2007-02-27 13:58 ` [PATA] Failed to set xfermode on LITE-ON LTR-48246S Philipp Matthias Hahn
2007-03-05  4:10   ` Tejun Heo
2007-03-05 10:38     ` Philipp Matthias Hahn
2007-03-05 15:46       ` Tejun Heo
2007-03-06  9:23         ` Philipp Matthias Hahn
2007-03-09 12:50           ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070205155627.GA8354@elte.hu \
    --to=mingo@elte.hu \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).