diff mbox

[05/16] media: fsl-viu: allow building it with COMPILE_TEST

Message ID 24a526280e4eb319147908ccab786e2ebc8f8076.1522949748.git.mchehab@s-opensource.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab April 5, 2018, 5:54 p.m. UTC
There aren't many things that would be needed to allow it
to build with compile test.

Add the needed bits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 drivers/media/platform/Kconfig   | 2 +-
 drivers/media/platform/fsl-viu.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

Comments

kernel test robot April 6, 2018, 7:15 p.m. UTC | #1
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-drivers-under-drivers-media-to-build-with-COMPILE_TEST/20180406-164215
base:   git://linuxtv.org/media_tree.git master
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

>> drivers/media//platform/fsl-viu.c:43:0: warning: "out_be32" redefined
    #define out_be32(v, a) writel(a, v)
    
   In file included from arch/m68k/include/asm/io_mm.h:27:0,
                    from arch/m68k/include/asm/io.h:5,
                    from include/linux/io.h:25,
                    from drivers/media//platform/fsl-viu.c:23:
   arch/m68k/include/asm/raw_io.h:46:0: note: this is the location of the previous definition
    #define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l))
    
>> drivers/media//platform/fsl-viu.c:44:0: warning: "in_be32" redefined
    #define in_be32(a) readl(a)
    
   In file included from arch/m68k/include/asm/io_mm.h:27:0,
                    from arch/m68k/include/asm/io.h:5,
                    from include/linux/io.h:25,
                    from drivers/media//platform/fsl-viu.c:23:
   arch/m68k/include/asm/raw_io.h:37:0: note: this is the location of the previous definition
    #define in_be32(addr) \
    

vim +/out_be32 +43 drivers/media//platform/fsl-viu.c

  > 23	#include <linux/io.h>
    24	#include <linux/of_address.h>
    25	#include <linux/of_irq.h>
    26	#include <linux/of_platform.h>
    27	#include <linux/slab.h>
    28	#include <media/v4l2-common.h>
    29	#include <media/v4l2-device.h>
    30	#include <media/v4l2-ioctl.h>
    31	#include <media/v4l2-ctrls.h>
    32	#include <media/v4l2-fh.h>
    33	#include <media/v4l2-event.h>
    34	#include <media/videobuf-dma-contig.h>
    35	
    36	#define DRV_NAME		"fsl_viu"
    37	#define VIU_VERSION		"0.5.1"
    38	
    39	/* Allow building this driver with COMPILE_TEST */
    40	#ifndef CONFIG_PPC_MPC512x
    41	#define NO_IRQ   0
    42	
  > 43	#define out_be32(v, a)	writel(a, v)
  > 44	#define in_be32(a) readl(a)
    45	#endif
    46	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 03c9dfeb7781..e6eb1eb776e1 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -42,7 +42,7 @@  config VIDEO_SH_VOU
 
 config VIDEO_VIU
 	tristate "Freescale VIU Video Driver"
-	depends on VIDEO_V4L2 && PPC_MPC512x
+	depends on VIDEO_V4L2 && (PPC_MPC512x || COMPILE_TEST)
 	select VIDEOBUF_DMA_CONTIG
 	default y
 	---help---
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 9abe79779659..466053e00378 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -36,6 +36,14 @@ 
 #define DRV_NAME		"fsl_viu"
 #define VIU_VERSION		"0.5.1"
 
+/* Allow building this driver with COMPILE_TEST */
+#ifndef CONFIG_PPC_MPC512x
+#define NO_IRQ   0
+
+#define out_be32(v, a)	writel(a, v)
+#define in_be32(a) readl(a)
+#endif
+
 #define BUFFER_TIMEOUT		msecs_to_jiffies(500)  /* 0.5 seconds */
 
 #define	VIU_VID_MEM_LIMIT	4	/* Video memory limit, in Mb */