Hi Colin, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.15 next-20180202] [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/Colin-King/media-cx25821-prevent-out-of-bounds-read-on-array-card/20180203-130958 base: git://linuxtv.org/media_tree.git master config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 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=xtensa All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:7:0, from include/linux/kernel.h:14, from include/linux/list.h:9, from include/linux/kobject.h:20, from include/linux/device.h:17, from include/linux/i2c.h:30, from drivers/media/pci/cx25821/cx25821-core.c:22: drivers/media/pci/cx25821/cx25821-core.c: In function 'cx25821_dev_setup': >> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^~~~~~~~ include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~ >> drivers/media/pci/cx25821/cx25821.h:380:2: note: in expansion of macro 'pr_info' pr_info("(%d): " fmt, dev->board, ##args) ^~~~~~~ >> drivers/media/pci/cx25821/cx25821-core.c:871:3: note: in expansion of macro 'CX25821_INFO' CX25821_INFO("dev->nr >= %ld", ARRAY_SIZE(card)); ^~~~~~~~~~~~ vim +/pr_info +380 drivers/media/pci/cx25821/cx25821.h 02b20b0b drivers/staging/cx25821/cx25821.h Mauro Carvalho Chehab 2009-09-15 374 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 375 #define CX25821_ERR(fmt, args...) \ 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 376 pr_err("(%d): " fmt, dev->board, ##args) 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 377 #define CX25821_WARN(fmt, args...) \ 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 378 pr_warn("(%d): " fmt, dev->board, ##args) 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 379 #define CX25821_INFO(fmt, args...) \ 36d89f7d drivers/staging/cx25821/cx25821.h Joe Perches 2010-11-07 @380 pr_info("(%d): " fmt, dev->board, ##args) 02b20b0b drivers/staging/cx25821/cx25821.h Mauro Carvalho Chehab 2009-09-15 381 :::::: The code at line 380 was first introduced by commit :::::: 36d89f7de4a4937848de86d9b35cb03a9f0357e1 [media] drivers/staging/cx25821: Use pr_fmt and pr_<level> :::::: TO: Joe Perches <joe@xxxxxxxxxxx> :::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip