Message ID | 1409073919-27336-1-git-send-email-broonie@kernel.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1XMKV4-00014d-Ek; Tue, 26 Aug 2014 19:25:42 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtp id 1XMKV2-0002PL-1O; Tue, 26 Aug 2014 19:25:42 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbaHZRZi (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 26 Aug 2014 13:25:38 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:34391 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751435AbaHZRZh (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 26 Aug 2014 13:25:37 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <broonie@sirena.org.uk>) id 1XMKUl-0004fD-Q7; Tue, 26 Aug 2014 17:25:24 +0000 Received: from broonie by debutante with local (Exim 4.84) (envelope-from <broonie@sirena.org.uk>) id 1XMKUi-00077f-Tj; Tue, 26 Aug 2014 18:25:20 +0100 From: Mark Brown <broonie@kernel.org> To: Peter Foley <pefoley2@pefoley.com>, Randy Dunlap <rdunlap@infradead.org>, Mauro Carvalho Chehab <m.chehab@samsung.com>, Hans Verkuil <hans.verkuil@cisco.com> Cc: linux-media@vger.kernel.org, linux-doc@vger.kernel.org, linaro-kernel@lists.linaro.org, Mark Brown <broonie@linaro.org> Date: Tue, 26 Aug 2014 18:25:19 +0100 Message-Id: <1409073919-27336-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.1.0.rc1 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH] [media] v4l2-pci-skeleton: Only build if PCI is available X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.8.26.171821 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Mark Brown
Aug. 26, 2014, 5:25 p.m. UTC
From: Mark Brown <broonie@linaro.org> Currently arm64 does not support PCI but it does support v4l2. Since the PCI skeleton driver is built unconditionally as a module with no dependency on PCI this causes build failures for arm64 allmodconfig. Fix this by defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising the build on that. Signed-off-by: Mark Brown <broonie@linaro.org> --- The patch adding the Makefile was added to the Documentation tree, either it should be reverted or something like this added on top. Documentation/video4linux/Makefile | 2 +- drivers/media/v4l2-core/Kconfig | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
Comments
On 08/26/14 10:25, Mark Brown wrote: > From: Mark Brown <broonie@linaro.org> > > Currently arm64 does not support PCI but it does support v4l2. Since the > PCI skeleton driver is built unconditionally as a module with no dependency > on PCI this causes build failures for arm64 allmodconfig. Fix this by > defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising > the build on that. Looks good. Applied. Thanks. I'm pretty sure that it also needs "depends on VIDEOBUF2_CORE" or something in that family. I'll check that and add it. > Signed-off-by: Mark Brown <broonie@linaro.org> > --- > > The patch adding the Makefile was added to the Documentation tree, > either it should be reverted or something like this added on top. > > Documentation/video4linux/Makefile | 2 +- > drivers/media/v4l2-core/Kconfig | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile > index d58101e788fc..65a351d75c95 100644 > --- a/Documentation/video4linux/Makefile > +++ b/Documentation/video4linux/Makefile > @@ -1 +1 @@ > -obj-m := v4l2-pci-skeleton.o > +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o > diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig > index 9ca0f8d59a14..2b368f711c9e 100644 > --- a/drivers/media/v4l2-core/Kconfig > +++ b/drivers/media/v4l2-core/Kconfig > @@ -25,6 +25,13 @@ config VIDEO_FIXED_MINOR_RANGES > > When in doubt, say N. > > +config VIDEO_PCI_SKELETON > + tristate "Skeleton PCI V4L2 driver" > + depends on PCI && COMPILE_TEST > + ---help--- > + Enable build of the skeleton PCI driver, used as a reference > + when developign new drivers. > + > # Used by drivers that need tuner.ko > config VIDEO_TUNER > tristate >
On 08/26/14 10:25, Mark Brown wrote: > From: Mark Brown <broonie@linaro.org> > > Currently arm64 does not support PCI but it does support v4l2. Since the > PCI skeleton driver is built unconditionally as a module with no dependency > on PCI this causes build failures for arm64 allmodconfig. Fix this by > defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising > the build on that. > > Signed-off-by: Mark Brown <broonie@linaro.org> > --- > > The patch adding the Makefile was added to the Documentation tree, > either it should be reverted or something like this added on top. > > Documentation/video4linux/Makefile | 2 +- > drivers/media/v4l2-core/Kconfig | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile > index d58101e788fc..65a351d75c95 100644 > --- a/Documentation/video4linux/Makefile > +++ b/Documentation/video4linux/Makefile > @@ -1 +1 @@ > -obj-m := v4l2-pci-skeleton.o > +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o > diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig > index 9ca0f8d59a14..2b368f711c9e 100644 > --- a/drivers/media/v4l2-core/Kconfig > +++ b/drivers/media/v4l2-core/Kconfig > @@ -25,6 +25,13 @@ config VIDEO_FIXED_MINOR_RANGES > > When in doubt, say N. > > +config VIDEO_PCI_SKELETON > + tristate "Skeleton PCI V4L2 driver" > + depends on PCI && COMPILE_TEST && ?? No, don't require COMPILE_TEST. However, PCI || COMPILE_TEST would allow it to build on arm64 if COMPILE_TEST is enabled, guaranteeing build errors. Is that what should happen? I suppose so... > + ---help--- > + Enable build of the skeleton PCI driver, used as a reference > + when developign new drivers. > + > # Used by drivers that need tuner.ko > config VIDEO_TUNER > tristate >
On Tue, Aug 26, 2014 at 12:20:54PM -0700, Randy Dunlap wrote: > On 08/26/14 10:25, Mark Brown wrote: > > index d58101e788fc..65a351d75c95 100644 > > --- a/Documentation/video4linux/Makefile > > +++ b/Documentation/video4linux/Makefile > > @@ -1 +1 @@ > > -obj-m := v4l2-pci-skeleton.o > > +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o > > diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig > > +config VIDEO_PCI_SKELETON > > + tristate "Skeleton PCI V4L2 driver" > > + depends on PCI && COMPILE_TEST > && ?? No, don't require COMPILE_TEST. That's a very deliberate choice. There's no reason I can see to build this code other than to check that it builds, it's reference code rather than something that someone is expected to actually use in their system. This seems like a perfect candidate for COMPILE_TEST. > However, PCI || COMPILE_TEST would allow it to build on arm64 > if COMPILE_TEST is enabled, guaranteeing build errors. > Is that what should happen? I suppose so... No, it's not - if it's going to depend on COMPILE_TEST at all it need to be a hard dependency.
On 08/26/14 12:26, Mark Brown wrote: > On Tue, Aug 26, 2014 at 12:20:54PM -0700, Randy Dunlap wrote: >> On 08/26/14 10:25, Mark Brown wrote: > >>> index d58101e788fc..65a351d75c95 100644 >>> --- a/Documentation/video4linux/Makefile >>> +++ b/Documentation/video4linux/Makefile >>> @@ -1 +1 @@ >>> -obj-m := v4l2-pci-skeleton.o >>> +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o >>> diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig > >>> +config VIDEO_PCI_SKELETON >>> + tristate "Skeleton PCI V4L2 driver" >>> + depends on PCI && COMPILE_TEST > >> && ?? No, don't require COMPILE_TEST. > > That's a very deliberate choice. There's no reason I can see to build > this code other than to check that it builds, it's reference code rather > than something that someone is expected to actually use in their system. > This seems like a perfect candidate for COMPILE_TEST. > >> However, PCI || COMPILE_TEST would allow it to build on arm64 >> if COMPILE_TEST is enabled, guaranteeing build errors. >> Is that what should happen? I suppose so... > > No, it's not - if it's going to depend on COMPILE_TEST at all it need to > be a hard dependency. How about just drop COMPILE_TEST? This code only builds if someone enabled BUILD_DOCSRC. That should be enough (along with PCI and some VIDEO kconfig symbols) to qualify it.
On 08/26/14 12:59, Randy Dunlap wrote: > On 08/26/14 12:26, Mark Brown wrote: >> On Tue, Aug 26, 2014 at 12:20:54PM -0700, Randy Dunlap wrote: >>> On 08/26/14 10:25, Mark Brown wrote: >> >>>> index d58101e788fc..65a351d75c95 100644 >>>> --- a/Documentation/video4linux/Makefile >>>> +++ b/Documentation/video4linux/Makefile >>>> @@ -1 +1 @@ >>>> -obj-m := v4l2-pci-skeleton.o >>>> +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o >>>> diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig >> >>>> +config VIDEO_PCI_SKELETON >>>> + tristate "Skeleton PCI V4L2 driver" >>>> + depends on PCI && COMPILE_TEST >> >>> && ?? No, don't require COMPILE_TEST. >> >> That's a very deliberate choice. There's no reason I can see to build >> this code other than to check that it builds, it's reference code rather >> than something that someone is expected to actually use in their system. >> This seems like a perfect candidate for COMPILE_TEST. >> >>> However, PCI || COMPILE_TEST would allow it to build on arm64 >>> if COMPILE_TEST is enabled, guaranteeing build errors. >>> Is that what should happen? I suppose so... >> >> No, it's not - if it's going to depend on COMPILE_TEST at all it need to >> be a hard dependency. > > How about just drop COMPILE_TEST? This code only builds if someone enabled > BUILD_DOCSRC. That should be enough (along with PCI and some VIDEO kconfig > symbols) to qualify it. I'll add BUILD_DOCSRC to the depends list in the Kconfig file...
On Tue, Aug 26, 2014 at 01:08:39PM -0700, Randy Dunlap wrote: > On 08/26/14 12:59, Randy Dunlap wrote: > > On 08/26/14 12:26, Mark Brown wrote: > >> No, it's not - if it's going to depend on COMPILE_TEST at all it need to > >> be a hard dependency. > > How about just drop COMPILE_TEST? This code only builds if someone enabled > > BUILD_DOCSRC. That should be enough (along with PCI and some VIDEO kconfig > > symbols) to qualify it. > I'll add BUILD_DOCSRC to the depends list in the Kconfig file... OK, that symbol probably does the job - I wasn't aware of it previously.
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile index d58101e788fc..65a351d75c95 100644 --- a/Documentation/video4linux/Makefile +++ b/Documentation/video4linux/Makefile @@ -1 +1 @@ -obj-m := v4l2-pci-skeleton.o +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig index 9ca0f8d59a14..2b368f711c9e 100644 --- a/drivers/media/v4l2-core/Kconfig +++ b/drivers/media/v4l2-core/Kconfig @@ -25,6 +25,13 @@ config VIDEO_FIXED_MINOR_RANGES When in doubt, say N. +config VIDEO_PCI_SKELETON + tristate "Skeleton PCI V4L2 driver" + depends on PCI && COMPILE_TEST + ---help--- + Enable build of the skeleton PCI driver, used as a reference + when developign new drivers. + # Used by drivers that need tuner.ko config VIDEO_TUNER tristate