Re: [PATCH v2 1/2] media: i2c: Add driver for the Analog Devices ADDI9036 ToF front-end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bogdan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on linus/master v5.9-rc7 next-20201002]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bogdan-Togorean/media-i2c-Add-driver-for-the-Analog-Devices-ADDI9036-ToF-front-end/20201002-213657
base:   git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/20f15c0bb888393b2a87ef884a36cb7b5c796698
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bogdan-Togorean/media-i2c-Add-driver-for-the-Analog-Devices-ADDI9036-ToF-front-end/20201002-213657
        git checkout 20f15c0bb888393b2a87ef884a36cb7b5c796698
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/build_bug.h:5,
                    from include/linux/bits.h:22,
                    from include/linux/gpio/consumer.h:5,
                    from drivers/media/i2c/addi9036.c:9:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:405,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:20,
                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/gpio/consumer.h:6,
                    from drivers/media/i2c/addi9036.c:9:
   drivers/media/i2c/addi9036.c: In function 'addi9036_s_stream':
>> drivers/media/i2c/addi9036.c:476:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'ssize_t' {aka 'int'} [-Wformat=]
     476 |   dev_dbg(addi9036->dev, "Writen %lu registers\n",
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
     125 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
     157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/media/i2c/addi9036.c:476:3: note: in expansion of macro 'dev_dbg'
     476 |   dev_dbg(addi9036->dev, "Writen %lu registers\n",
         |   ^~~~~~~
   drivers/media/i2c/addi9036.c:476:36: note: format string is defined here
     476 |   dev_dbg(addi9036->dev, "Writen %lu registers\n",
         |                                  ~~^
         |                                    |
         |                                    long unsigned int
         |                                  %u

vim +476 drivers/media/i2c/addi9036.c

   453	
   454	static int addi9036_s_stream(struct v4l2_subdev *subdev, int enable)
   455	{
   456		struct addi9036 *addi9036 = to_addi9036(subdev);
   457		uint8_t mode = addi9036->curr_operating_mode;
   458		int ret = 0;
   459	
   460		dev_dbg(addi9036->dev, "s_stream: %d\n", enable);
   461	
   462		if (addi9036->streaming == enable)
   463			return 0;
   464	
   465		if (enable) {
   466			if (addi9036->mode_fw_blocks[mode].mode_regs == NULL) {
   467				dev_err(addi9036->dev, "Selected mode has no data\n");
   468				return -EINVAL;
   469			}
   470	
   471			dev_dbg(addi9036->dev, "Applying mode: %u\n", mode);
   472			ret = regmap_multi_reg_write(addi9036->regmap,
   473					addi9036->mode_fw_blocks[mode].mode_regs,
   474					addi9036->mode_fw_blocks[mode].regs_count);
   475	
 > 476			dev_dbg(addi9036->dev, "Writen %lu registers\n",
   477				addi9036->mode_fw_blocks[mode].regs_count);
   478		}
   479	
   480		addi9036->streaming = enable;
   481		return ret;
   482	}
   483	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux