From: Trent Piepho <xyzzy@speakeasy.org>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "Roman Zippel" <zippel@linux-m68k.org>,
"Linux and Kernel Video" <video4linux-list@redhat.com>,
linux-usb-devel@lists.sourceforge.net,
=?X-UNKNOWN?Q?Toralf_F=F6rster?= <toralf.foerster@gmx.de>,
"Oliver Neukum" <oneukum@suse.de>,
LKML <linux-kernel@vger.kernel.org>,
"Jan Engelhardt" <jengelh@linux01.gwdg.de>,
"Luca Risolia" <luca.risolia@studio.unibo.it>
Subject: Re: Kconfig troubles when using menuconfig - Was: [patch]Re: [linux-usb-devel] linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Date: Fri, 22 Jun 2007 13:20:41 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0706221259500.4914@shell4.speakeasy.net> (raw)
In-Reply-To: <1182518566.14289.20.camel@gaivota>
On Fri, 22 Jun 2007, Mauro Carvalho Chehab wrote:
> Hi Roman,
>
> Several instabilities on Kconfig started to happen after replacing
> Kconfig menus to use menuconfig, as this one, reported by Oliver:
This is the same problem I explained before:
http://www.linuxtv.org/pipermail/v4l-dvb-maintainer/2007-May/004121.html
What you have is tristate depends on bool depends on tristate. The bool
between the two tristates "promotes" the first tristate from m to y.
> In this specific case, all V4L USB drivers depends on V4L_USB_DRIVERS,
> that depends, in turn, on USB. So, if USB is not selected,
> V4L_USB_DRIVERS should be unselected, unselecting zc0301.
If you set USB=n, then you can not turn on V4L_USB_DRIVERS and in turn
USB_ZC0301 can't be turned on. That does work correctly.
The problem is that if USB=m, then because V4L_USB_DRIVERS is a bool, it is
possible to set V4L_USB_DRIVERS=y. Now you can set USB_ZC0301=y, because
USB_ZC0301 only depends on V4L_USB_DRIVERS and that is 'y'. So you end up
with USB=m and USB_ZC0301=y, which shouldn't be allowed.
There are two easy solutions to this that I can think of. First,
just make the menuconfig a tristate:
diff -r dfbe7cc4e21e drivers/media/video/Kconfig
--- a/drivers/media/video/Kconfig Thu Jun 21 16:02:50 2007 -0700
+++ b/drivers/media/video/Kconfig Fri Jun 22 13:14:29 2007 -0700
@@ -687,7 +687,7 @@ config VIDEO_CAFE_CCIC
#
menuconfig V4L_USB_DRIVERS
- bool "V4L USB devices"
+ tristate "V4L USB devices"
depends on USB
default y
Now the menuconfig entry will be a tristate, which seems kind of odd. If
USB=m, then you won't be able to set V4L_USB_DRIVERS to 'y', only to 'n' or
'm', and in turn none of the USB devices can be set to 'y'.
Or another way, add the dependencies of the menuconfig to the if statement:
diff -r dfbe7cc4e21e drivers/media/video/Kconfig
--- a/drivers/media/video/Kconfig Thu Jun 21 16:02:50 2007 -0700
+++ b/drivers/media/video/Kconfig Fri Jun 22 13:10:43 2007 -0700
@@ -691,7 +691,7 @@ menuconfig V4L_USB_DRIVERS
depends on USB
default y
-if V4L_USB_DRIVERS
+if V4L_USB_DRIVERS && USB
source "drivers/media/video/pvrusb2/Kconfig"
Now all the usb drivers will gain USB as a dependency directly and can't be
set to something higher than USB.
next prev parent reply other threads:[~2007-06-22 20:20 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200706211117.55908.toralf.foerster@gmx.de>
[not found] ` <200706211231.53898.luca.risolia@studio.unibo.it>
[not found] ` <200706211326.45031.toralf.foerster@gmx.de>
[not found] ` <200706211350.14526.oneukum@suse.de>
2007-06-22 13:22 ` Mauro Carvalho Chehab
2007-06-22 13:46 ` Andreas Herrmann
2007-06-22 13:51 ` Jan Engelhardt
2007-06-22 14:23 ` Andreas Herrmann
2007-06-22 15:03 ` Mauro Carvalho Chehab
2007-06-22 15:32 ` Andreas Herrmann
2007-06-22 15:45 ` Oliver Neukum
2007-06-22 14:27 ` Roman Zippel
2007-06-22 15:18 ` Jan Engelhardt
2007-06-22 16:24 ` Roman Zippel
2007-06-22 16:42 ` Jan Engelhardt
2007-06-22 20:17 ` Satyam Sharma
2007-06-22 21:00 ` Satyam Sharma
2007-06-22 15:21 ` Mauro Carvalho Chehab
2007-06-22 16:31 ` Roman Zippel
2007-06-22 20:20 ` Trent Piepho [this message]
2007-06-22 21:20 ` Satyam Sharma
2007-06-22 21:45 ` Roman Zippel
2007-06-22 22:01 ` Satyam Sharma
2007-06-22 22:21 ` Roman Zippel
2007-06-22 22:33 ` Satyam Sharma
2007-06-22 23:12 ` Roman Zippel
2007-06-22 23:26 ` Satyam Sharma
2007-06-22 23:39 ` Roman Zippel
2007-06-22 23:49 ` Satyam Sharma
2007-06-23 0:26 ` Roman Zippel
2007-06-23 6:57 ` Jan Engelhardt
2007-06-25 0:11 ` Roman Zippel
2007-06-22 22:11 ` Jan Engelhardt
2007-06-23 12:28 ` Kconfig troubles when using menuconfig - Was: [patch]Re: " Oleg Verych
2007-06-23 22:33 ` Kconfig troubles when using menuconfig - Was: [patch]Re: [linux-usb-devel] " Trent Piepho
2007-06-24 3:28 ` Satyam Sharma
2007-06-23 7:20 ` [patch] 2.6.22-rc Kconfig troubles when using menuconfig Jan Engelhardt
2007-06-23 22:26 ` Mauro Carvalho Chehab
2007-06-24 0:14 ` Trent Piepho
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=Pine.LNX.4.58.0706221259500.4914@shell4.speakeasy.net \
--to=xyzzy@speakeasy.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=luca.risolia@studio.unibo.it \
--cc=mchehab@infradead.org \
--cc=oneukum@suse.de \
--cc=toralf.foerster@gmx.de \
--cc=video4linux-list@redhat.com \
--cc=zippel@linux-m68k.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®