diff mbox

[v2,05/19] media: fsl-viu: allow building it with COMPILE_TEST

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

Commit Message

Mauro Carvalho Chehab April 5, 2018, 8:29 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, 10:43 a.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-media-drivers-build-with-COMPILE_TEST/20180406-163048
base:   git://linuxtv.org/media_tree.git master
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-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=sparc64 

All warnings (new ones prefixed by >>):

>> drivers/media/platform/fsl-viu.c:41:0: warning: "NO_IRQ" redefined
    #define NO_IRQ   0
    
   In file included from arch/sparc/include/asm/irq.h:5:0,
                    from include/linux/interrupt.h:19,
                    from drivers/media/platform/fsl-viu.c:22:
   arch/sparc/include/asm/irq_64.h:98:0: note: this is the location of the previous definition
    #define NO_IRQ  0xffffffff
    
   drivers/media/platform/fsl-viu.c: In function 'viu_setup_preview':
   drivers/media/platform/fsl-viu.c:760:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     reg_val.field_base_addr = (u32)dev->ovbuf.base;
                               ^

vim +/NO_IRQ +41 drivers/media/platform/fsl-viu.c

    38	
    39	/* Allow building this driver with COMPILE_TEST */
    40	#ifndef CONFIG_PPC_MPC512x
  > 41	#define NO_IRQ   0
    42	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot April 6, 2018, 2:03 p.m. UTC | #2
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 >>):

   drivers/media/platform/fsl-viu.c:1081:25: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1081:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1081:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1082:25: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1082:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1082:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1083:25: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1083:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1083:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1095:17: sparse: incorrect type in argument 1 (different address spaces)
   drivers/media/platform/fsl-viu.c:1095:17:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1095:17:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1000:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1000:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1000:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1001:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1001:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1001:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1002:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1002:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1002:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1003:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1003:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1003:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1004:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1004:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1004:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1005:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1005:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1005:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1006:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/media/platform/fsl-viu.c:1006:9:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1006:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1006:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/media/platform/fsl-viu.c:1006:9:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1006:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1231:22: sparse: incorrect type in argument 1 (different address spaces)
   drivers/media/platform/fsl-viu.c:1231:22:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1231:22:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1232:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1232:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1232:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1237:22: sparse: incorrect type in argument 1 (different address spaces)
   drivers/media/platform/fsl-viu.c:1237:22:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1237:22:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1238:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1238:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1238:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1318:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1318:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1318:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1319:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1319:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1319:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1320:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1320:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1320:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1321:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1321:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1321:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1322:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1322:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1322:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1323:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1323:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1323:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1324:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1324:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1324:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1325:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1325:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1325:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1326:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1326:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1326:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1327:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/media/platform/fsl-viu.c:1327:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1327:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1447:21: sparse: incorrect type in assignment (different address spaces)
   drivers/media/platform/fsl-viu.c:1447:21:    expected struct viu_reg *vr
   drivers/media/platform/fsl-viu.c:1447:21:    got struct viu_reg [noderef] <asn:2>*[assigned] viu_regs
   drivers/media/platform/fsl-viu.c: In function 'viu_setup_preview':
>> drivers/media/platform/fsl-viu.c:760:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     reg_val.field_base_addr = (u32)dev->ovbuf.base;
                               ^

sparse warnings: (new ones prefixed by >>)

>> drivers/media/platform/fsl-viu.c:1119:18: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1119:18:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1119:18:    got unsigned int *<noident>
>> drivers/media/platform/fsl-viu.c:1128:17: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1128:17:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1128:17:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1158:18: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1158:18:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1158:18:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1159:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1159:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1159:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:260:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:260:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:260:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:261:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:261:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:261:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:270:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:270:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:270:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:273:22: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:273:22:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:273:22:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:275:17: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:275:17:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:275:17:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:279:38: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:279:38:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:279:38:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:286:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:286:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:286:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:287:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:287:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:287:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:290:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:290:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:290:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:718:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:718:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:718:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:719:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:719:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:719:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:720:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:720:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:720:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1025:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1025:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1025:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1026:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1026:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1026:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1027:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1027:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1027:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1032:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1032:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1032:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1081:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1081:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1081:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1082:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1082:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1082:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1083:25: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1083:25:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1083:25:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1095:17: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1095:17:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1095:17:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:446:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:446:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:446:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:447:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:447:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:447:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:448:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:448:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:448:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1000:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1000:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1000:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1001:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1001:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1001:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1002:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1002:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1002:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1003:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1003:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1003:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1004:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1004:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1004:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1005:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1005:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1005:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1006:9: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1006:9:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1006:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1006:9: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1006:9:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1006:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1231:22: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1231:22:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1231:22:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1232:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1232:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1232:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1237:22: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1237:22:    expected void const volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1237:22:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1238:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1238:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1238:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1318:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1318:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1318:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1319:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1319:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1319:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1320:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1320:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1320:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1321:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1321:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1321:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1322:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1322:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1322:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1323:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1323:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1323:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1324:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1324:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1324:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1325:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1325:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1325:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1326:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1326:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1326:9:    got unsigned int *<noident>
   drivers/media/platform/fsl-viu.c:1327:9: sparse: incorrect type in argument 2 (different address spaces) @@    expected void volatile [noderef] <asn:2>*addr @@    got eref] <asn:2>*addr @@
   drivers/media/platform/fsl-viu.c:1327:9:    expected void volatile [noderef] <asn:2>*addr
   drivers/media/platform/fsl-viu.c:1327:9:    got unsigned int *<noident>
>> drivers/media/platform/fsl-viu.c:1447:21: sparse: incorrect type in assignment (different address spaces) @@    expected struct viu_reg *vr @@    got struct viu_reg [noderef] <asstruct viu_reg *vr @@
   drivers/media/platform/fsl-viu.c:1447:21:    expected struct viu_reg *vr
   drivers/media/platform/fsl-viu.c:1447:21:    got struct viu_reg [noderef] <asn:2>*[assigned] viu_regs
   drivers/media/platform/fsl-viu.c: In function 'viu_setup_preview':
   drivers/media/platform/fsl-viu.c:760:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     reg_val.field_base_addr = (u32)dev->ovbuf.base;
                               ^

vim +760 drivers/media/platform/fsl-viu.c

95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  722  
791ae699 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2011-05-04  723  static int viu_setup_preview(struct viu_dev *dev, struct viu_fh *fh)
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  724  {
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  725  	int bpp;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  726  
0a6b9b04 drivers/media/platform/fsl-viu.c Hans Verkuil       2015-07-20  727  	dprintk(1, "%s %dx%d\n", __func__,
0a6b9b04 drivers/media/platform/fsl-viu.c Hans Verkuil       2015-07-20  728  		fh->win.w.width, fh->win.w.height);
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  729  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  730  	reg_val.status_cfg = 0;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  731  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  732  	/* setup window */
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  733  	reg_val.picture_count = (fh->win.w.height / 2) << 16 |
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  734  				fh->win.w.width;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  735  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  736  	/* setup color depth and dma increment */
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  737  	bpp = dev->ovfmt->depth / 8;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  738  	switch (bpp) {
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  739  	case 2:
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  740  		reg_val.status_cfg &= ~MODE_32BIT;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  741  		reg_val.dma_inc = fh->win.w.width * 2;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  742  		break;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  743  	case 4:
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  744  		reg_val.status_cfg |= MODE_32BIT;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  745  		reg_val.dma_inc = fh->win.w.width * 4;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  746  		break;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  747  	default:
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  748  		dprintk(0, "device doesn't support color depth(%d)\n",
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  749  			bpp * 8);
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  750  		return -EINVAL;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  751  	}
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  752  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  753  	dev->ovfield = fh->win.field;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  754  	if (!V4L2_FIELD_HAS_BOTH(dev->ovfield))
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  755  		reg_val.dma_inc = 0;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  756  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  757  	reg_val.status_cfg |= DMA_ACT | INT_DMA_END_EN | INT_FIELD_EN;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  758  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  759  	/* setup the base address of the overlay buffer */
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02 @760  	reg_val.field_base_addr = (u32)dev->ovbuf.base;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  761  
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  762  	return 0;
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  763  }
95c5d605 drivers/media/video/fsl-viu.c    Anatolij Gustschin 2010-07-02  764  

:::::: The code at line 760 was first introduced by commit
:::::: 95c5d605ca6fd6ab5ab0f6d097ff97d5aa2f9235 V4L/DVB: v4l: Add MPC5121e VIU video capture driver

:::::: TO: Anatolij Gustschin <agust@denx.de>
:::::: 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 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 */