linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST
@ 2019-03-04 20:29 Arnd Bergmann
  2019-03-05  8:04 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-03-04 20:29 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Mark Brown, Geert Uytterhoeven, Robin Murphy,
	linux-media, devel, linux-kernel

The driver should really call dm365_isif_setup_pinmux() through a callback,
but it runs platform specific code by itself, which never actually compiled:

/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimplicit-function-declaration]
        davinci_cfg_reg(DM365_VIN_CAM_WEN);
        ^
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:18: error: use of undeclared identifier 'DM365_VIN_CAM_WEN'
        davinci_cfg_reg(DM365_VIN_CAM_WEN);
                        ^
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2029:18: error: use of undeclared identifier 'DM365_VIN_CAM_VD'
        davinci_cfg_reg(DM365_VIN_CAM_VD);
                        ^
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2030:18: error: use of undeclared identifier 'DM365_VIN_CAM_HD'
        davinci_cfg_reg(DM365_VIN_CAM_HD);
                        ^
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2031:18: error: use of undeclared identifier 'DM365_VIN_YIN4_7_EN'
        davinci_cfg_reg(DM365_VIN_YIN4_7_EN);
                        ^
/git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2032:18: error: use of undeclared identifier 'DM365_VIN_YIN0_3_EN'
        davinci_cfg_reg(DM365_VIN_YIN0_3_EN);
                        ^
7 errors generated.

Fixes: 4907c73deefe ("media: staging: davinci_vpfe: allow building with COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/media/davinci_vpfe/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/davinci_vpfe/Kconfig b/drivers/staging/media/davinci_vpfe/Kconfig
index aea449a8dbf8..84ac6b9e1767 100644
--- a/drivers/staging/media/davinci_vpfe/Kconfig
+++ b/drivers/staging/media/davinci_vpfe/Kconfig
@@ -1,7 +1,7 @@
 config VIDEO_DM365_VPFE
 	tristate "DM365 VPFE Media Controller Capture Driver"
 	depends on VIDEO_V4L2
-	depends on (ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF) || COMPILE_TEST
+	depends on (ARCH_DAVINCI_DM365 && !VIDEO_DM365_ISIF)
 	depends on VIDEO_V4L2_SUBDEV_API
 	depends on VIDEO_DAVINCI_VPBE_DISPLAY
 	select VIDEOBUF2_DMA_CONTIG
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST
  2019-03-04 20:29 [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST Arnd Bergmann
@ 2019-03-05  8:04 ` Geert Uytterhoeven
  2019-03-05  8:47   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-03-05  8:04 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Mark Brown,
	Robin Murphy, Linux Media Mailing List, driverdevel,
	Linux Kernel Mailing List

Hi Arnd,

On Mon, Mar 4, 2019 at 9:30 PM Arnd Bergmann <arnd@arndb.de> wrote:
> The driver should really call dm365_isif_setup_pinmux() through a callback,
> but it runs platform specific code by itself, which never actually compiled:
>
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimplicit-function-declaration]
>         davinci_cfg_reg(DM365_VIN_CAM_WEN);
>         ^
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:18: error: use of undeclared identifier 'DM365_VIN_CAM_WEN'
>         davinci_cfg_reg(DM365_VIN_CAM_WEN);
>                         ^
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2029:18: error: use of undeclared identifier 'DM365_VIN_CAM_VD'
>         davinci_cfg_reg(DM365_VIN_CAM_VD);
>                         ^
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2030:18: error: use of undeclared identifier 'DM365_VIN_CAM_HD'
>         davinci_cfg_reg(DM365_VIN_CAM_HD);
>                         ^
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2031:18: error: use of undeclared identifier 'DM365_VIN_YIN4_7_EN'
>         davinci_cfg_reg(DM365_VIN_YIN4_7_EN);
>                         ^
> /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2032:18: error: use of undeclared identifier 'DM365_VIN_YIN0_3_EN'
>         davinci_cfg_reg(DM365_VIN_YIN0_3_EN);
>                         ^
> 7 errors generated.

Which tree and which config is this?
This driver compiles fine with m68k/allmodconfig on v5.0?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST
  2019-03-05  8:04 ` Geert Uytterhoeven
@ 2019-03-05  8:47   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-03-05  8:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Mark Brown,
	Robin Murphy, Linux Media Mailing List, driverdevel,
	Linux Kernel Mailing List

On Tue, Mar 5, 2019 at 9:05 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, Mar 4, 2019 at 9:30 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > The driver should really call dm365_isif_setup_pinmux() through a callback,
> > but it runs platform specific code by itself, which never actually compiled:
> >
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimplicit-function-declaration]
> >         davinci_cfg_reg(DM365_VIN_CAM_WEN);
> >         ^
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:18: error: use of undeclared identifier 'DM365_VIN_CAM_WEN'
> >         davinci_cfg_reg(DM365_VIN_CAM_WEN);
> >                         ^
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2029:18: error: use of undeclared identifier 'DM365_VIN_CAM_VD'
> >         davinci_cfg_reg(DM365_VIN_CAM_VD);
> >                         ^
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2030:18: error: use of undeclared identifier 'DM365_VIN_CAM_HD'
> >         davinci_cfg_reg(DM365_VIN_CAM_HD);
> >                         ^
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2031:18: error: use of undeclared identifier 'DM365_VIN_YIN4_7_EN'
> >         davinci_cfg_reg(DM365_VIN_YIN4_7_EN);
> >                         ^
> > /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2032:18: error: use of undeclared identifier 'DM365_VIN_YIN0_3_EN'
> >         davinci_cfg_reg(DM365_VIN_YIN0_3_EN);
> >                         ^
> > 7 errors generated.
>
> Which tree and which config is this?
> This driver compiles fine with m68k/allmodconfig on v5.0?

Ah, thanks for checking, I found the real issue now:

The Makefile contains a nasty hack that makes it work /almost/ everywhere

# Allow building it with COMPILE_TEST on other archs
ifndef CONFIG_ARCH_DAVINCI
ccflags-y += -I $(srctree)/arch/arm/mach-davinci/include/
endif

This is something we probably don't want to do, but it mostly happens to
do the right thing for compile testing. The case I ran into is the rare
exception of arch/arm/mach-omap1, which has a different mach/mux.h
header, so the '#include <mach/mux.h>' in the driver gets the omap
file rather than the davinci file, and then misses the davinci_cfg_reg()
declaration and the macros.

One way to work around this is to pile on to the hack by adding
'depends on !ARCH_OMAP1'. Should we do that, or is there
a better way out? Do we actually still need the staging driver
in addition to the one in drivers/media/platform/davinci ?

       Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-05  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 20:29 [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST Arnd Bergmann
2019-03-05  8:04 ` Geert Uytterhoeven
2019-03-05  8:47   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).