Message ID | 0538c91427253cffe4e2feee1865838a3504ce96.1522959716.git.mchehab@s-opensource.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.16 next-20180406] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/Make-all-media-drivers-build-with-COMPILE_TEST/20180406-163048 base: git://linuxtv.org/media_tree.git master config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from drivers/media/platform/davinci/vpbe_display.c:35:0: drivers/media/platform/davinci/vpbe_display.c: In function 'register_device': >> drivers/media/platform/davinci/vpbe_display.c:1358:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (int)vpbe_display_layer, ^ include/media/v4l2-common.h:69:44: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~ >> drivers/media/platform/davinci/vpbe_display.c:1356:2: note: in expansion of macro 'v4l2_info' v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, ^~~~~~~~~ drivers/media/platform/davinci/vpbe_display.c:1359:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (int)&vpbe_display_layer->video_dev); ^ include/media/v4l2-common.h:69:44: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~ >> drivers/media/platform/davinci/vpbe_display.c:1356:2: note: in expansion of macro 'v4l2_info' v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, ^~~~~~~~~ vim +1358 drivers/media/platform/davinci/vpbe_display.c a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1347 4c62e976 drivers/media/platform/davinci/vpbe_display.c Greg Kroah-Hartman 2012-12-21 1348 static int register_device(struct vpbe_layer *vpbe_display_layer, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1349 struct vpbe_display *disp_dev, 4c62e976 drivers/media/platform/davinci/vpbe_display.c Greg Kroah-Hartman 2012-12-21 1350 struct platform_device *pdev) 4c62e976 drivers/media/platform/davinci/vpbe_display.c Greg Kroah-Hartman 2012-12-21 1351 { a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1352 int err; a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1353 a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1354 v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1355 "Trying to register VPBE display device.\n"); a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 @1356 v4l2_info(&disp_dev->vpbe_dev->v4l2_dev, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1357 "layer=%x,layer->video_dev=%x\n", a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 @1358 (int)vpbe_display_layer, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1359 (int)&vpbe_display_layer->video_dev); a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1360 266c9c2d drivers/media/platform/davinci/vpbe_display.c Prabhakar Lad 2014-10-12 1361 vpbe_display_layer->video_dev.queue = &vpbe_display_layer->buffer_queue; a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1362 err = video_register_device(&vpbe_display_layer->video_dev, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1363 VFL_TYPE_GRABBER, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1364 -1); a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1365 if (err) a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1366 return -ENODEV; a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1367 a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1368 vpbe_display_layer->disp_dev = disp_dev; a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1369 /* set the driver data in platform device */ a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1370 platform_set_drvdata(pdev, disp_dev); a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1371 video_set_drvdata(&vpbe_display_layer->video_dev, a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1372 vpbe_display_layer); a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1373 a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1374 return 0; a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1375 } a2c25b44 drivers/media/video/davinci/vpbe_display.c Manjunath Hadli 2011-06-17 1376 :::::: The code at line 1358 was first introduced by commit :::::: a2c25b444e99f2369b29e507568c8703186174d0 [media] davinci vpbe: V4L2 display driver for DM644X SoC :::::: TO: Manjunath Hadli <manjunath.hadli@ti.com> :::::: CC: Mauro Carvalho Chehab <mchehab@redhat.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/media/platform/davinci/Kconfig b/drivers/media/platform/davinci/Kconfig index babdb4877b3f..b463d1726335 100644 --- a/drivers/media/platform/davinci/Kconfig +++ b/drivers/media/platform/davinci/Kconfig @@ -82,7 +82,8 @@ config VIDEO_DM365_ISIF config VIDEO_DAVINCI_VPBE_DISPLAY tristate "TI DaVinci VPBE V4L2-Display driver" - depends on VIDEO_V4L2 && ARCH_DAVINCI + depends on VIDEO_V4L2 + depends on ARCH_DAVINCI || COMPILE_TEST depends on HAS_DMA depends on I2C select VIDEOBUF2_DMA_CONTIG diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 6aabd21fe69f..7b6cd4b3ccc4 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -26,7 +26,10 @@ #include <linux/slab.h> #include <asm/pgtable.h> + +#ifdef CONFIG_ARCH_DAVINCI #include <mach/cputype.h> +#endif #include <media/v4l2-dev.h> #include <media/v4l2-common.h> diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index 66449791c70c..10f2bf11edf3 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -24,8 +24,10 @@ #include <linux/clk.h> #include <linux/slab.h> +#ifdef CONFIG_ARCH_DAVINCI #include <mach/cputype.h> #include <mach/hardware.h> +#endif #include <media/davinci/vpss.h> #include <media/v4l2-device.h> diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c index 3a4e78595149..add72a39ef2d 100644 --- a/drivers/media/platform/davinci/vpbe_venc.c +++ b/drivers/media/platform/davinci/vpbe_venc.c @@ -21,8 +21,11 @@ #include <linux/videodev2.h> #include <linux/slab.h> +#ifdef CONFIG_ARCH_DAVINCI #include <mach/hardware.h> #include <mach/mux.h> +#endif + #include <linux/platform_data/i2c-davinci.h> #include <linux/io.h>
Except for some includes (with doesn't seem to be used), this driver builds fine with COMPILE_TEST. So, add checks there to avoid building it if ARCH_DAVINCI is not selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> --- drivers/media/platform/davinci/Kconfig | 3 ++- drivers/media/platform/davinci/vpbe_display.c | 3 +++ drivers/media/platform/davinci/vpbe_osd.c | 2 ++ drivers/media/platform/davinci/vpbe_venc.c | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-)