All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH -next] media/usb: fix kconfig dependencies (aka bool depending on tristate considered harmful)
Date: Wed, 8 May 2013 23:18:19 +0200	[thread overview]
Message-ID: <20130508211819.GF3413@free.fr> (raw)
In-Reply-To: <518A98D9.4020906@infradead.org>

Randy, All,

On Wed, May 08, 2013 at 11:26:33AM -0700, Randy Dunlap wrote:
> (a.k.a. Kconfig bool depending on a tristate considered harmful)

Maybe that would warrant a bit of explanations in:
    Documentation/kbuild/kconfig-language.txt

> Fix various build errors when CONFIG_USB=m and media USB drivers
> are builtin.  In this case, CONFIG_USB_ZR364XX=y,
> CONFIG_VIDEO_PVRUSB2=y, and CONFIG_VIDEO_STK1160=y.
> 
> This is caused by (from drivers/media/usb/Kconfig):
> 
> menuconfig MEDIA_USB_SUPPORT
> 	bool "Media USB Adapters"
> 	depends on USB && MEDIA_SUPPORT
> 	           =m     =y
> so MEDIA_USB_SUPPORT=y and all following Kconfig 'source' lines
> are included.  By adding an "if USB" guard around the 'source' lines,
> the needed dependencies are enforced.
[--SNIP--]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>  drivers/media/usb/Kconfig |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- linux-next-20130508.orig/drivers/media/usb/Kconfig
> +++ linux-next-20130508/drivers/media/usb/Kconfig
> @@ -5,6 +5,7 @@ menuconfig MEDIA_USB_SUPPORT
>  	  Enable media drivers for USB bus.
>  	  If you have such devices, say Y.
>  
> +if USB
>  if MEDIA_USB_SUPPORT

Why not starting the 'if USB' block just above MEDIA_USB_SUPPORT, and
removing the 'depends on USB' from MEDIA_USB_SUPPORT :

---8<--- 
if USB
menuconfig MEDIA_USB_SUPPORT
    bool "Media USB Adapters"
    depends on MEDIA_SUPPORT

if MEDIA_USB_SUPPORT
---8<--- 

And keeping this hunk as-is:
> @@ -52,3 +53,4 @@ source "drivers/media/usb/em28xx/Kconfig
>  endif
>  
>  endif #MEDIA_USB_SUPPORT
> +endif #USB

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2013-05-08 21:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08  4:01 linux-next: Tree for May 8 Stephen Rothwell
2013-05-08  4:01 ` Stephen Rothwell
2013-05-08 17:57 ` linux-next: Tree for May 8 (gpio-mcp23s08) Randy Dunlap
2013-05-08 18:04 ` linux-next: Tree for May 8 (dlm) Randy Dunlap
2013-05-08 18:04   ` [Cluster-devel] " Randy Dunlap
2013-05-08 23:47   ` Stephen Rothwell
2013-05-08 23:47     ` [Cluster-devel] " Stephen Rothwell
2013-05-09 16:50     ` David Teigland
2013-05-09 16:50       ` [Cluster-devel] " David Teigland
2013-05-09 17:08       ` Randy Dunlap
2013-05-09 17:08         ` [Cluster-devel] " Randy Dunlap
2013-05-13  9:18         ` Steven Whitehouse
2013-05-13  9:18           ` [Cluster-devel] " Steven Whitehouse
2013-05-13 16:30           ` Randy Dunlap
2013-05-13 16:30             ` [Cluster-devel] " Randy Dunlap
     [not found]             ` <51913F8B.7080201@infradead.org>
     [not found]               ` <51914045.1060900@infradead.org>
2013-05-13 19:45                 ` Randy Dunlap
2013-05-13 19:45                   ` [Cluster-devel] " Randy Dunlap
2013-05-14  8:51                   ` Steven Whitehouse
2013-05-14  8:51                     ` [Cluster-devel] " Steven Whitehouse
2013-05-14 17:02                     ` [PATCH -next] gfs2: fix DLM depends to fix build errors Randy Dunlap
2013-05-14 17:02                       ` [Cluster-devel] " Randy Dunlap
2013-05-15 10:05                       ` Steven Whitehouse
2013-05-15 10:05                         ` [Cluster-devel] " Steven Whitehouse
2013-05-08 18:26 ` [PATCH -next] media/usb: fix kconfig dependencies (aka bool depending on tristate considered harmful) Randy Dunlap
2013-05-08 21:18   ` Yann E. MORIN [this message]
2013-05-08 21:28     ` [PATCH -next v2] " Randy Dunlap

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=20130508211819.GF3413@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.