Re: [PATCH v3 3/5] media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera

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

 



Hi Martin,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next pavel-linux-leds/for-next v5.13-rc4 next-20210528]
[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/Martin-Kepplinger/Add-support-for-the-Hynix-Hi-846-camera/20210531-200931
base:   git://linuxtv.org/media_tree.git master
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/990f55e1171e0120ffbbb77faac9b75091f105f2
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Martin-Kepplinger/Add-support-for-the-Hynix-Hi-846-camera/20210531-200931
        git checkout 990f55e1171e0120ffbbb77faac9b75091f105f2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

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

All errors (new ones prefixed by >>):

   In file included from ./arch/nios2/include/generated/asm/div64.h:1,
                    from include/linux/math.h:5,
                    from include/linux/kernel.h:14,
                    from include/linux/unaligned/packed_struct.h:4,
                    from include/linux/unaligned/le_struct.h:5,
                    from include/asm-generic/unaligned.h:18,
                    from ./arch/nios2/include/generated/asm/unaligned.h:1,
                    from drivers/media/i2c/hi846.c:4:
   drivers/media/i2c/hi846.c: In function 'hi846_set_video_mode':
   include/asm-generic/div64.h:228:28: warning: comparison of distinct pointer types lacks a cast
     228 |  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
         |                            ^~
   include/asm-generic/div64.h:226:21: note: in definition of macro 'do_div'
     226 |  uint32_t __base = (base);   \
         |                     ^~~~
   drivers/media/i2c/hi846.c:1469:35: note: in expansion of macro 'do_div'
    1469 |  frame_length = do_div(link_freq, do_div(fps, HI846_LINE_LENGTH));
         |                                   ^~~~~~
   include/asm-generic/div64.h:241:25: warning: right shift count >= width of type [-Wshift-count-overflow]
     241 |  } else if (likely(((n) >> 32) == 0)) {  \
         |                         ^~
   include/asm-generic/div64.h:226:21: note: in definition of macro 'do_div'
     226 |  uint32_t __base = (base);   \
         |                     ^~~~
   include/asm-generic/div64.h:241:13: note: in expansion of macro 'likely'
     241 |  } else if (likely(((n) >> 32) == 0)) {  \
         |             ^~~~~~
   drivers/media/i2c/hi846.c:1469:35: note: in expansion of macro 'do_div'
    1469 |  frame_length = do_div(link_freq, do_div(fps, HI846_LINE_LENGTH));
         |                                   ^~~~~~
>> include/asm-generic/div64.h:245:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
     245 |   __rem = __div64_32(&(n), __base); \
         |                      ^~~~
         |                      |
         |                      int *
   include/asm-generic/div64.h:226:21: note: in definition of macro 'do_div'
     226 |  uint32_t __base = (base);   \
         |                     ^~~~
   drivers/media/i2c/hi846.c:1469:35: note: in expansion of macro 'do_div'
    1469 |  frame_length = do_div(link_freq, do_div(fps, HI846_LINE_LENGTH));
         |                                   ^~~~~~
   include/asm-generic/div64.h:219:38: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'int *'
     219 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
         |                            ~~~~~~~~~~^~~~~~~~
   include/asm-generic/div64.h:228:28: warning: comparison of distinct pointer types lacks a cast
     228 |  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
         |                            ^~
   drivers/media/i2c/hi846.c:1469:17: note: in expansion of macro 'do_div'
    1469 |  frame_length = do_div(link_freq, do_div(fps, HI846_LINE_LENGTH));
         |                 ^~~~~~
   cc1: some warnings being treated as errors


vim +/__div64_32 +245 include/asm-generic/div64.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  221  
^1da177e4c3f41 Linus Torvalds 2005-04-16  222  /* The unnecessary pointer compare is there
^1da177e4c3f41 Linus Torvalds 2005-04-16  223   * to check for type safety (n must be 64bit)
^1da177e4c3f41 Linus Torvalds 2005-04-16  224   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  225  # define do_div(n,base) ({				\
^1da177e4c3f41 Linus Torvalds 2005-04-16  226  	uint32_t __base = (base);			\
^1da177e4c3f41 Linus Torvalds 2005-04-16  227  	uint32_t __rem;					\
^1da177e4c3f41 Linus Torvalds 2005-04-16  228  	(void)(((typeof((n)) *)0) == ((uint64_t *)0));	\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  229  	if (__builtin_constant_p(__base) &&		\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  230  	    is_power_of_2(__base)) {			\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  231  		__rem = (n) & (__base - 1);		\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  232  		(n) >>= ilog2(__base);			\
461a5e51060c93 Nicolas Pitre  2015-10-30  233  	} else if (__div64_const32_is_OK &&		\
461a5e51060c93 Nicolas Pitre  2015-10-30  234  		   __builtin_constant_p(__base) &&	\
461a5e51060c93 Nicolas Pitre  2015-10-30  235  		   __base != 0) {			\
461a5e51060c93 Nicolas Pitre  2015-10-30  236  		uint32_t __res_lo, __n_lo = (n);	\
461a5e51060c93 Nicolas Pitre  2015-10-30  237  		(n) = __div64_const32(n, __base);	\
461a5e51060c93 Nicolas Pitre  2015-10-30  238  		/* the remainder can be computed with 32-bit regs */ \
461a5e51060c93 Nicolas Pitre  2015-10-30  239  		__res_lo = (n);				\
461a5e51060c93 Nicolas Pitre  2015-10-30  240  		__rem = __n_lo - __res_lo * __base;	\
911918aa7ef6f8 Nicolas Pitre  2015-11-02  241  	} else if (likely(((n) >> 32) == 0)) {		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  242  		__rem = (uint32_t)(n) % __base;		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  243  		(n) = (uint32_t)(n) / __base;		\
^1da177e4c3f41 Linus Torvalds 2005-04-16  244  	} else 						\
^1da177e4c3f41 Linus Torvalds 2005-04-16 @245  		__rem = __div64_32(&(n), __base);	\
^1da177e4c3f41 Linus Torvalds 2005-04-16  246  	__rem;						\
^1da177e4c3f41 Linus Torvalds 2005-04-16  247   })
^1da177e4c3f41 Linus Torvalds 2005-04-16  248  

---
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]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux