Hi Michael, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.0-rc4 next-20190222] [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/Michael-Tretter/Add-ZynqMP-VCU-Allegro-DVT-H-264-encoder-driver/20190214-090312 base: git://linuxtv.org/media_tree.git master config: nds32-allmodconfig (attached as .config) compiler: nds32le-linux-gcc (GCC) 6.4.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 GCC_VERSION=6.4.0 make.cross ARCH=nds32 All warnings (new ones prefixed by >>): In file included from include/media/v4l2-subdev.h:24:0, from include/media/v4l2-device.h:25, from drivers/staging/media/allegro-dvt/allegro-core.c:22: drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_mbox_write': include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ >> drivers/staging/media/allegro-dvt/allegro-core.c:749:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ >> drivers/staging/media/allegro-dvt/allegro-core.c:749:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:756:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:769:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_mbox_read': include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:798:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:810:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:810:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:816:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'ssize_t {aka int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:816:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_receive_message': include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1542:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1542:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_copy_firmware': include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ >> include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG' v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ ^~~~~~~~~~ >> drivers/staging/media/allegro-dvt/allegro-core.c:1618:2: note: in expansion of macro 'v4l2_dbg' v4l2_dbg(1, debug, &dev->v4l2_dev, ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_copy_fw_codec': include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ >> include/media/v4l2-common.h:72:14: note: in expansion of macro 'KERN_ERR' v4l2_printk(KERN_ERR, dev, fmt , ## arg) ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1640:3: note: in expansion of macro 'v4l2_err' v4l2_err(&dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ >> include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG' v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ ^~~~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1645:2: note: in expansion of macro 'v4l2_dbg' v4l2_dbg(1, debug, &dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ >> include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG' v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ ^~~~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1645:2: note: in expansion of macro 'v4l2_dbg' v4l2_dbg(1, debug, &dev->v4l2_dev, ^~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c: In function 'allegro_buf_queue': include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ >> include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG' v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ ^~~~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1949:3: note: in expansion of macro 'v4l2_dbg' v4l2_dbg(1, debug, &dev->v4l2_dev, ^~~~~~~~ include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/media/v4l2-common.h:69:9: note: in definition of macro 'v4l2_printk' printk(level "%s: " fmt, (dev)->name , ## arg) ^~~~~ include/linux/kern_levels.h:15:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ >> include/media/v4l2-common.h:85:16: note: in expansion of macro 'KERN_DEBUG' v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ ^~~~~~~~~~ drivers/staging/media/allegro-dvt/allegro-core.c:1949:3: note: in expansion of macro 'v4l2_dbg' v4l2_dbg(1, debug, &dev->v4l2_dev, ^~~~~~~~ vim +/v4l2_err +749 drivers/staging/media/allegro-dvt/allegro-core.c 736 737 static int allegro_mbox_write(struct allegro_dev *dev, 738 struct allegro_mbox *mbox, void *src, size_t size) 739 { 740 struct mcu_msg_header *header = src; 741 unsigned int tail; 742 size_t size_no_wrap; 743 int err = 0; 744 745 if (!src) 746 return -EINVAL; 747 748 if (size > mbox->size) { > 749 v4l2_err(&dev->v4l2_dev, 750 "message (%lu bytes) to large for mailbox (%lu bytes)\n", 751 size, mbox->size); 752 return -EINVAL; 753 } 754 755 if (header->length != size - sizeof(*header)) { 756 v4l2_err(&dev->v4l2_dev, 757 "invalid message length: %u bytes (expected %lu bytes)\n", 758 header->length, size - sizeof(*header)); 759 return -EINVAL; 760 } 761 762 v4l2_dbg(2, debug, &dev->v4l2_dev, 763 "write command message: type %s, body length %d\n", 764 msg_type_name(header->type), header->length); 765 766 mutex_lock(&mbox->lock); 767 regmap_read(dev->sram, mbox->tail, &tail); 768 if (tail > mbox->size) { 769 v4l2_err(&dev->v4l2_dev, 770 "invalid tail (0x%x): must be smaller than mailbox size (0x%lx)\n", 771 tail, mbox->size); 772 err = -EIO; 773 goto out; 774 } 775 size_no_wrap = min(size, mbox->size - (size_t)tail); 776 regmap_bulk_write(dev->sram, mbox->data + tail, src, size_no_wrap / 4); 777 regmap_bulk_write(dev->sram, mbox->data, 778 src + size_no_wrap, (size - size_no_wrap) / 4); 779 regmap_write(dev->sram, mbox->tail, (tail + size) % mbox->size); 780 781 out: 782 mutex_unlock(&mbox->lock); 783 784 return err; 785 } 786 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip