From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:53855 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754332AbZBKHyJ (ORCPT ); Wed, 11 Feb 2009 02:54:09 -0500 Date: Wed, 11 Feb 2009 05:53:38 -0200 From: Mauro Carvalho Chehab To: Trent Piepho Cc: Hans Verkuil , Eduard Huguet , linux-media@vger.kernel.org Subject: Re: cx8802.ko module not being built with current HG tree Message-ID: <20090211055338.393fa187@pedra.chehab.org> In-Reply-To: References: <617be8890902050754p4b8828c9o14b43b6879633cd7@mail.gmail.com> <200902102132.00114.hverkuil@xs4all.nl> <20090210184147.61d4655e@pedra.chehab.org> <200902102221.40067.hverkuil@xs4all.nl> <20090210221710.389c264e@pedra.chehab.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On Tue, 10 Feb 2009 17:20:52 -0800 (PST) Trent Piepho wrote: > On Tue, 10 Feb 2009, Mauro Carvalho Chehab wrote: > > > I did some more testing and the bug disappears in kernel 2.6.25. Also, if I > > > just run 'make', then the .config file it produces is fine. I wonder if it > > > isn't a bug in menuconfig itself. > > > > It seems to be a bug at the Kbuild, fixed on Feb, 2008, on this changeset: > > commit 587c90616a5b44e6ccfac38e64d4fecee51d588c (attached). > > > > As explained, after the patch description, the value for the Kconfig var, after > > the patch, uses this formula: > > > > (value && dependency) || select > > It's odd that the patch is for "fix select in combination with default", > yet there is no select used for CX88_DVB. If you look at the patch code, it fixed the handling for non-visible Kconfig vars. > I think what you've done with CX88_MPEG is something that nothing else in has used before, which made use > of the behavior introduced by this patch in a new way. > > > And there there's no select, the value of CONFIG_CX88_MPEG is determined by: > > ('y' && dependency) > > > > The most complex case is when we have CX88 defined as: > > CX88 = 'y' > > > > if both CX88_DVB and CX88_BLACKBIRD are defined as 'm' (or one of them is 'n' > > and the other is 'm'), then CX88_MPEG is defined as: > > CX88_MPEG = 'm' > > > > If one of CX88_DVB or CX88_BLACKBIRD is defined as 'y'; then we have: > > CX88_MPEG = 'y' > > > > If both are 'n', we have: > > CX88_MPEG = 'n' > > > > So, it seems that, after commit 587c90616a5b44e6ccfac38e64d4fecee51d588c, > > everything is working as expected. We just need to provide a hack at the > > out-of-tree build system for kernels that don't have this commit applied. > > I still think using select is better. What Roman Zippel was talking about > was the mess with select and the tuner drivers. I agree that's a mess and > there are better ways to do it without using select. But the MPEG module > is like a library used by just DVB and BLACKBIRD. It seems like the ideal > case for using select. I can't foresee any case where this logic would fail in the future. Let's suppose that some newer dependencies would be needed. If those dependencies will be properly added at DVB and/or at BLACKBIRD, this logic will still work. There's no possible case where CX88_MPEG would need a dependency that aren't needed by either DVB and/or BLACKBIRD. Also, by using depends on, instead of select, will warrant that CX88_MPEG will have the proper 'y' or 'm' value, depending on the dependencies of CX88_DVB and CX88_BLACKBIRD. It seems that this is exactly what Roman expected to be fixed by changing from "select" to "depends on" with tuners. Cheers, Mauro