From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tvk4h6qjmzDqLv for ; Fri, 6 Jan 2017 10:13:24 +1100 (AEDT) From: Arnd Bergmann To: "Andrew F. Davis" Cc: linuxppc-dev@lists.ozlabs.org, Russell King , Miguel Ojeda Sandonis , Wolfram Sang , Richard Purdie , Benjamin Herrenschmidt , Mauro Carvalho Chehab , Ulf Hansson , Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , Ingo Molnar , linux-pwm@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v2 6/6] [media] Only descend into directory when CONFIG_MEDIA_SUPPORT is set Date: Fri, 06 Jan 2017 00:12:13 +0100 Message-ID: <32595176.b3HvexHCfd@wuerfel> In-Reply-To: References: <20170105210158.14204-1-afd@ti.com> <4225650.R96pl5clWf@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thursday, January 5, 2017 4:35:33 PM CET Andrew F. Davis wrote: > On 01/05/2017 03:42 PM, Arnd Bergmann wrote: > > On Thursday, January 5, 2017 3:01:58 PM CET Andrew F. Davis wrote: > >> @@ -109,7 +109,8 @@ obj-$(CONFIG_SERIO) += input/serio/ > >> obj-$(CONFIG_GAMEPORT) += input/gameport/ > >> obj-$(CONFIG_INPUT) += input/ > >> obj-$(CONFIG_RTC_LIB) += rtc/ > >> -obj-y += i2c/ media/ > >> +obj-y += i2c/ > >> +obj-$(CONFIG_MEDIA_SUPPORT) += media/ > >> obj-$(CONFIG_PPS) += pps/ > >> obj-y += ptp/ > >> obj-$(CONFIG_W1) += w1/ > >> > > > > This one seems wrong: if CONFIG_MEDIA_SUPPORT=m, but some I2C drivers > > inside of drivers/media/ are built-in, we will fail to enter the directory, > > see drivers/media/Makefile. > > Not sure if I see this, it looks like everything in drivers/media/ > depends on CONFIG_MEDIA_SUPPORT (directly or indirectly). If > CONFIG_MEDIA_SUPPORT is =m then all dependents should be locked out of > being built-in. > > Any bool symbol that controls compilation of source that depends on a > tristate symbol is broken and should be fixed anyway. I don't think it's this easy, we have a couple of cases where that doesn't work. I have not looked at the media example in detail, but at least it looks intentional. Note that drivers/media is rather creative with expressing dependencies. Arnd