Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Sat, 23 Jun 2007, Satyam Sharma wrote: On 6/23/07, Trent Piepho [EMAIL PROTECTED] wrote: [...] 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. [...] 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. Ok, so we add this as solution 2.(c) to the reply I just sent to Jan :-) But I still prefer 2.(b) -- making the config scripts intelligent so that if a given menuconfig FOO depends on BAR, then all the config BAZs inside this menuconfig also automatically depend on BAR too. Of course, there currently is no inside a menuconfig. You would have to do something like make everything inside an if FOO / endif gain not just a dependency on FOO, but also gain a dependency on all of FOO's dependencies. This is simpler in the long run because it requires least amount (actually none) of redundant typing and would continue to work in the future if/when the: menuconfig FOO if FOO ... endif # FOO idiom is converted to an: configmenu FOO ... endconfigmenu # FOO kind of idiom ... Like that I suggested here? http://article.gmane.org/gmane.linux.kernel/524823 Basically, make menuconfig work like menu does, except the menu itself can be turned on and off. Instead of having menuconfig work like a config, but with some kind of menu hint. It seems like the former is more in line with what menuconfig is actually used for. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi Trent, On 6/23/07, Trent Piepho [EMAIL PROTECTED] wrote: [...] 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. [...] 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. Ok, so we add this as solution 2.(c) to the reply I just sent to Jan :-) But I still prefer 2.(b) -- making the config scripts intelligent so that if a given menuconfig FOO depends on BAR, then all the config BAZs inside this menuconfig also automatically depend on BAR too. This is simpler in the long run because it requires least amount (actually none) of redundant typing and would continue to work in the future if/when the: menuconfig FOO if FOO ... endif # FOO idiom is converted to an: configmenu FOO ... endconfigmenu # FOO kind of idiom ... Satyam - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi, On Sat, 23 Jun 2007, Satyam Sharma wrote: given menuconfig FOO depends on BAR, then all the config BAZs inside this menuconfig also automatically depend on BAR too. This is simpler in the long run because it requires least amount (actually none) of redundant typing I don't like this, as this would attach special meaning to a menuconfig. menuconfig is really a type of config symbol, rather than a type of menu. Potentially this could also be written as: config FOO option menu ... bye, Roman - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Jun 23 2007 02:50, Satyam Sharma wrote: Ok, so we add this as solution 2.(c) to the reply I just sent to Jan :-) But I still prefer 2.(b) -- making the config scripts intelligent so that if a given menuconfig FOO depends on BAR, then all the config BAZs inside this menuconfig also automatically depend on BAR too. This is simpler in the long run because it requires least amount (actually none) of redundant typing and would continue to work in the future if/when the: menuconfig FOO if FOO ... endif # FOO idiom is converted to an: configmenu FOO ... endconfigmenu # FOO kind of idiom ... Of course *this* *is* *the preferred* thing. (I think even Sam liked that one better than the current menuconfig menuconfig confusion.) But, as always, you need someone to code it, etc. Jan -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
* Newsgroups: linux.kernel,comp.video.video4linux,linux.usb.devel As you might know, there's no organized central traking system, thus this huge lists of MLs... But, as always, you need someone to code it, etc. ... and no relevant one, where somebody can actually see the problem and/or to code it. Please, care to add [EMAIL PROTECTED] next time. On Jun 23 2007 02:50, Satyam Sharma wrote: [] menuconfig FOO if FOO ... endif # FOO idiom is converted to an: configmenu FOO ... endconfigmenu # FOO kind of idiom ... Bah, i can't believe. Guys, are you serious about not converting everything in to XML ?:) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Fri, Jun 22, 2007 at 10:22:46AM -0300, 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: Em Qui, 2007-06-21 às 13:50 +0200, Oliver Neukum escreveu: Am Donnerstag, 21. Juni 2007 schrieb Toralf Förster: Right, but IMHO this issue is typical for a problem with the Kconfig definitions of this module. I'll set USB devs as Cc: therefore. The Kconfig there is incomplete. Mauro, please apply. Regards Oliver Signed-off-by: Oliver Neukum [EMAIL PROTECTED] --- a/drivers/media/video/zc0301/Kconfig2007-06-21 13:44:14.0 +0200 +++ b/drivers/media/video/zc0301/Kconfig2007-06-21 13:44:33.0 +0200 @@ -1,6 +1,6 @@ config USB_ZC0301 tristate USB ZC0301[P] Image Processor and Control Chip support - depends on VIDEO_V4L1 + depends on VIDEO_V4L1 USB ---help--- Say Y here if you want support for cameras based on the ZC0301 or ZC0301P Image Processors and Control Chips. 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. Unfortunately, the Kernel building system is not properly handling it. This is the (snipped) media/video/Kconfig: menuconfig V4L_USB_DRIVERS bool V4L USB devices depends on USB default y if V4L_USB_DRIVERS source drivers/media/video/pvrusb2/Kconfig snip/ source drivers/media/video/zc0301/Kconfig snip/ endif # V4L_USB_DRIVERS -- Cheers, Mauro Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. Regards, Andreas -- Correct Kconfig to avoid compile errors like drivers/built-in.o: In function `sn9c102_usb_disconnect': sn9c102_core.c:(.text+0x8d840): undefined reference to `usb_get_dev' Signed-off-by: Andreas Herrmann [EMAIL PROTECTED] diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 4cca551..4754d98 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -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 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Jun 22 2007 15:46, Andreas Herrmann wrote: Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. A config option that is not referenced in the Makefile... should it really be a tristate? In my opinion, changing it to tristate is just a workaround, but I don't know kconfig well enough to make bool Do The Right Thing in these situations myself :( Jan -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi, 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: Em Qui, 2007-06-21 às 13:50 +0200, Oliver Neukum escreveu: Am Donnerstag, 21. Juni 2007 schrieb Toralf Förster: Right, but IMHO this issue is typical for a problem with the Kconfig definitions of this module. I'll set USB devs as Cc: therefore. There is too little context here, what was the exact error? I'm assuming it's the module vs. builtin problem? 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. Unfortunately, the Kernel building system is not properly handling it. This is the (snipped) media/video/Kconfig: menuconfig V4L_USB_DRIVERS bool V4L USB devices depends on USB default y The menuconfig patches were a little aggressive here, it created a config symbol where there was none before and in this case it even changed dependencies (it turns USB into a bool). I'm also a little irritated by the default y, if I enable V4L I'm very tempted to check what other useless stuff has been automatically enabled, which I have to turn off again. bye, Roman- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Fri, Jun 22, 2007 at 03:51:34PM +0200, Jan Engelhardt wrote: On Jun 22 2007 15:46, Andreas Herrmann wrote: Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. A config option that is not referenced in the Makefile... should it really be a tristate? In my opinion, changing it to tristate is just a workaround, but I don't know kconfig well enough to make bool Do The Right Thing in these situations myself :( dito Same problem occurred with menuconfig NET_PCMCIA. See http://marc.info/?l=linux-kernelm=118244569131373 Regards, Andreas -- Operating | AMD Saxony Limited Liability Company Co. KG, System | Wilschdorfer Landstr. 101, 01109 Dresden, Germany Research | Register Court Dresden: HRA 4896, General Partner authorized Center | to represent: AMD Saxony LLC (Wilmington, Delaware, US) (OSRC) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Em Sex, 2007-06-22 às 15:51 +0200, Jan Engelhardt escreveu: On Jun 22 2007 15:46, Andreas Herrmann wrote: Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. A config option that is not referenced in the Makefile... should it really be a tristate? In my opinion, changing it to tristate is just a workaround, but I don't know kconfig well enough to make bool Do The Right Thing in these situations myself :( If USB is built as a module, the V4L USB modules should also be built as a module. Otherwise, you will have compile errors, since some required symbols on the drivers won't be linked into the kernel. -- Cheers, Mauro - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Jun 22 2007 16:27, Roman Zippel wrote: 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. Unfortunately, the Kernel building system is not properly handling it. This is the (snipped) media/video/Kconfig: menuconfig V4L_USB_DRIVERS bool V4L USB devices depends on USB default y The menuconfig patches were a little aggressive here, it created a config symbol where there was none before and in this case it even changed dependencies (it turns USB into a bool). V4L_USB_DRIVERS=y turns USB into =y? That can't be. It should give the this depends on another symbol [USB] that is modular. I'm also a little irritated by the default y, if I enable V4L I'm very tempted to check what other useless stuff has been automatically enabled, which I have to turn off again. The default y only applies to the menu folders, not actual code. There have been discussions to remove the default-ys again, I've sent a patch [http://lkml.org/lkml/2007/5/12/216], but nothing happened. So, should all affected menuconfigs be transformed into tristates, what do you think, Roman? Let me know so I can cook up a patch (hopefully before 2.6.22) should they become tristate. Thanks, Jan -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Em Sex, 2007-06-22 às 16:27 +0200, Roman Zippel escreveu: Hi, 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: Em Qui, 2007-06-21 às 13:50 +0200, Oliver Neukum escreveu: Am Donnerstag, 21. Juni 2007 schrieb Toralf Förster: Right, but IMHO this issue is typical for a problem with the Kconfig definitions of this module. I'll set USB devs as Cc: therefore. There is too little context here, what was the exact error? I'm assuming it's the module vs. builtin problem? I also got copied on this without the full context. The menuconfig patches were a little aggressive here, it created a config symbol where there was none before and in this case it even changed dependencies (it turns USB into a bool). Hmm... Probably the change from tristate to bool caused the regression. I'm also a little irritated by the default y, if I enable V4L I'm very tempted to check what other useless stuff has been automatically enabled, which I have to turn off again. The added default y are the ones bellow: menuconfig VIDEO_CAPTURE_DRIVERS bool Video capture adapters depends on VIDEO_DEV default y menuconfig V4L_USB_DRIVERS bool V4L USB devices depends on USB default y menuconfig RADIO_ADAPTERS bool Radio Adapters depends on VIDEO_DEV default y menuconfig DVB_CAPTURE_DRIVERS bool DVB/ATSC adapters depends on DVB_CORE default y config DAB boolean DAB adapters default y All of them are used just to open a submenu. I'm to keep default y for the menuconfig items. Since those don't generate any code (there's no Makefile items associated with the menuconfig vars), this will just improve the usability for the final user (and will allow make oldconfig to work). There's not much sense on selecting V4L support without selecting a V4L driver. Cheers, Mauro - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Fri, Jun 22, 2007 at 12:03:19PM -0300, Mauro Carvalho Chehab wrote: Em Sex, 2007-06-22 às 15:51 +0200, Jan Engelhardt escreveu: On Jun 22 2007 15:46, Andreas Herrmann wrote: Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. A config option that is not referenced in the Makefile... should it really be a tristate? In my opinion, changing it to tristate is just a workaround, but I don't know kconfig well enough to make bool Do The Right Thing in these situations myself :( If USB is built as a module, the V4L USB modules should also be built as a module. Otherwise, you will have compile errors, since some required symbols on the drivers won't be linked into the kernel. Sure. And the patch should prevent user selection of such a broken kernel configuration. Regards, Andreas -- Operating | AMD Saxony Limited Liability Company Co. KG, System | Wilschdorfer Landstr. 101, 01109 Dresden, Germany Research | Register Court Dresden: HRA 4896, General Partner authorized Center | to represent: AMD Saxony LLC (Wilmington, Delaware, US) (OSRC) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Am Freitag, 22. Juni 2007 schrieb Mauro Carvalho Chehab: Em Sex, 2007-06-22 às 15:51 +0200, Jan Engelhardt escreveu: On Jun 22 2007 15:46, Andreas Herrmann wrote: Hi, I am not sure whether it is related or not But if you select USB as module but build your v4l_usb driver into the kernel you also get compile errors. Attached is a patch which will prevent this by changing the menuconfig from bool to tristate. A config option that is not referenced in the Makefile... should it really be a tristate? In my opinion, changing it to tristate is just a workaround, but I don't know kconfig well enough to make bool Do The Right Thing in these situations myself :( If USB is built as a module, the V4L USB modules should also be built as a module. Otherwise, you will have compile errors, since some required symbols on the drivers won't be linked into the kernel. Yes, and if you build USB statically, you can build the video drivers statically or as modules. The config language must reflect that. I don't it is possible to represent that with a bool. Regards Oliver - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi, On Fri, 22 Jun 2007, Jan Engelhardt wrote: V4L_USB_DRIVERS=y turns USB into =y? That can't be. It should give the this depends on another symbol [USB] that is modular. That's not how it works, the enclosed symbols depend now on V4L_USB_DRIVERS, which is a boolean and it can only have two states. It doesn't matter on what V4L_USB_DRIVERS depends only the final value matters. (BTW if check the dependency debug output in menuconfig/xconfig, you'll see which values are relevant in the calculation of a symbol value.) I'm also a little irritated by the default y, if I enable V4L I'm very tempted to check what other useless stuff has been automatically enabled, which I have to turn off again. The default y only applies to the menu folders, not actual code. I don't know that without checking the Makefile. There have been discussions to remove the default-ys again, I've sent a patch [http://lkml.org/lkml/2007/5/12/216], but nothing happened. So, should all affected menuconfigs be transformed into tristates, what do you think, Roman? Let me know so I can cook up a patch (hopefully before 2.6.22) should they become tristate. Using bool is clearly a bug and I'd prefer if it removed the defaults as well. bye, Roman - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On Jun 22 2007 18:24, Roman Zippel wrote: There have been discussions to remove the default-ys again, I've sent a patch [http://lkml.org/lkml/2007/5/12/216], but nothing happened. So, should all affected menuconfigs be transformed into tristates, what do you think, Roman? Let me know so I can cook up a patch (hopefully before 2.6.22) should they become tristate. Using bool is clearly a bug and I'd prefer if it removed the defaults as well. What I don't quite understand is, that CONFIG_CRYPTO is also a bool, its subparts are tristates however, and there is no problem involved with these. Jan -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi, On Fri, 22 Jun 2007, Mauro Carvalho Chehab wrote: I'm to keep default y for the menuconfig items. Since those don't generate any code (there's no Makefile items associated with the menuconfig vars), I don't know that without checking Makefiles/sources, so I have to assume it may produce some infrastructure code I don't need. this will just improve the usability for the final user (and will allow make oldconfig to work). I'd rather change that. There's not much sense on selecting V4L support without selecting a V4L driver. But if only want to enable a video driver, I likely don't want a radio driver... bye, Roman Reset generates values only if Kconfig and .config agree. Signed-off-by: Roman Zippel [EMAIL PROTECTED] --- scripts/kconfig/confdata.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) Index: linux-2.6/scripts/kconfig/confdata.c === --- linux-2.6.orig/scripts/kconfig/confdata.c +++ linux-2.6/scripts/kconfig/confdata.c @@ -341,27 +341,42 @@ int conf_read(const char *name) conf_unsaved++; /* maybe print value in verbose mode... */ sym_ok: + if (!sym_is_choice(sym)) + continue; + /* The choice symbol only has a set value (and thus is not new) +* if all its visible childs have values. +*/ + prop = sym_get_choice_prop(sym); + flags = sym-flags; + for (e = prop-expr; e; e = e-left.expr) + if (e-right.sym-visible != no) + flags = e-right.sym-flags; + sym-flags = flags | ~SYMBOL_DEF_USER; + } + + for_all_symbols(i, sym) { if (sym_has_value(sym) !sym_is_choice_value(sym)) { - if (sym-visible == no) + /* Reset values of generates values, so they'll appear +* as new, if they should become visible, but that +* doesn't quite work if the Kconfig and the saved +* configuration disagrees. +*/ + if (sym-visible == no !conf_unsaved) sym-flags = ~SYMBOL_DEF_USER; switch (sym-type) { case S_STRING: case S_INT: case S_HEX: - if (!sym_string_within_range(sym, sym-def[S_DEF_USER].val)) - sym-flags = ~(SYMBOL_VALID|SYMBOL_DEF_USER); + /* Reset a string value if it's out of range */ + if (sym_string_within_range(sym, sym-def[S_DEF_USER].val)) + break; + sym-flags = ~(SYMBOL_VALID|SYMBOL_DEF_USER); + conf_unsaved++; + break; default: break; } } - if (!sym_is_choice(sym)) - continue; - prop = sym_get_choice_prop(sym); - flags = sym-flags; - for (e = prop-expr; e; e = e-left.expr) - if (e-right.sym-visible != no) - flags = e-right.sym-flags; - sym-flags = flags | ~SYMBOL_DEF_USER; } sym_add_change_count(conf_warnings || conf_unsaved); - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Hi Jan, On 6/22/07, Jan Engelhardt [EMAIL PROTECTED] wrote: On Jun 22 2007 18:24, Roman Zippel wrote: There have been discussions to remove the default-ys again, I've sent a patch [http://lkml.org/lkml/2007/5/12/216], but nothing happened. So, should all affected menuconfigs be transformed into tristates, what do you think, Roman? Let me know so I can cook up a patch (hopefully before 2.6.22) should they become tristate. Using bool is clearly a bug and I'd prefer if it removed the defaults as well. What I don't quite understand is, that CONFIG_CRYPTO is also a bool, its subparts are tristates however, and there is no problem involved with these. That's because neither CONFIG_CRYPTO nor any of the crypto modules depend on another symbol that is itself tristate (and hence can be modular), which is the case with all the problematic cases that have been posted to lkml lately. Satyam - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
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. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Kconfig troubles when using menuconfig - Was: [patch]Re: linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
On 6/23/07, Satyam Sharma [EMAIL PROTECTED] wrote: Hi Jan, On 6/22/07, Jan Engelhardt [EMAIL PROTECTED] wrote: On Jun 22 2007 18:24, Roman Zippel wrote: There have been discussions to remove the default-ys again, I've sent a patch [http://lkml.org/lkml/2007/5/12/216], but nothing happened. So, should all affected menuconfigs be transformed into tristates, what do you think, Roman? Let me know so I can cook up a patch (hopefully before 2.6.22) should they become tristate. Using bool is clearly a bug and I'd prefer if it removed the defaults as well. What I don't quite understand is, that CONFIG_CRYPTO is also a bool, its subparts are tristates however, and there is no problem involved with these. That's because neither CONFIG_CRYPTO nor any of the crypto modules depend on another symbol that is itself tristate (and hence can be modular), which is the case with all the problematic cases that have been posted to lkml lately. To elaborate, the problem is: menuconfig FOO bool FOO support drivers depends on BAR if FOO config BAZ tristate BAZ driver endif # FOO Where: config BAR tristate BAR subsystem The problem occurs when: BAR=m FOO=y (user selects FOO to show menu to be able to then select BAZ) BAZ=y BAZ would be built-in, BAR modular = build breakage. Note that it is *BAZ* that depends on BAR. BAZ is *code* in the kernel sources, and depends on BAR because it calls *code* exported by BAR (obviously). [ We've marked _FOO_ as depends on BAR too, however, but that is only because all the related drivers that this menu shows / hides have the common property that they depend on BAR and hence there's no point in showing this menu option to the user unless he has picked BAR already.] The root cause of the problem, as Randy Dunlap pointed out yesterday, is a boolean coming in between the dependency chain of 2 tristates: BAZ (tristate) depends on FOO (bool) depends on BAR (tristate). BAR=m _does_ allow its dependency FOO to be y, which then allows BAZ (marked as dependency of only FOO but not BAR too, sadly) to be y. Solution 1: Make all FOO-like configmenu's trisate. = if BAR=m = FOO can only be m too = BAZ can only be m too. But making a menuconfig symbol tristate is ugly, IMHO. These new primitives are just on/off switches to show / hide a further menu that contains related drivers / options, after all. They are bool's by meaning, and need to defined / used as such too. [my opinion, fwiw] Solution 2: Explicitly honour the dependency of BAZ on BAR. 2.(a) do this either explicitly by adding depends on in kconfig itself: config BAZ tristate BAZ driver depends on BAR = do this for all the config symbols inside any if FOO / endif block where FOO depends on some other tristate symbol itself. But this sounds (and feels like being) redundant. 2.(b) or else, make the config scripts intelligent so that if: menuconfig FOO depends on BAR, then: All the config BAZs inside this menuconfig (inside the if FOO / endif block) also automatically depend on BAR too. I would vote for solution 2.(b), personally, but solution 1 is easiest. Satyam - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel