devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Martin Kepplinger <martin.kepplinger@puri.sm>,
	pavel@ucw.cz, krzysztof.kozlowski@canonical.com,
	laurent.pinchart@ideasonboard.com, mchehab@kernel.org,
	paul.kocialkowski@bootlin.com, robh@kernel.org,
	shawnx.tu@intel.com
Cc: kbuild-all@lists.01.org, devicetree@vger.kernel.org,
	kernel@puri.sm, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/5] media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera
Date: Tue, 1 Jun 2021 14:50:10 +0800	[thread overview]
Message-ID: <202106011430.eaaf2NGq-lkp@intel.com> (raw)
In-Reply-To: <20210531120737.168496-4-martin.kepplinger@puri.sm>

[-- Attachment #1: Type: text/plain, Size: 6984 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59654 bytes --]

  parent reply	other threads:[~2021-06-01  6:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 12:07 [PATCH v3 0/5] Add support for the Hynix Hi-846 camera Martin Kepplinger
2021-05-31 12:07 ` [PATCH v3 1/5] dt-bindings: vendor-prefixes: Add SK Hynix Inc Martin Kepplinger
2021-06-02 19:23   ` Rob Herring
2021-05-31 12:07 ` [PATCH v3 2/5] dt-bindings: media: document SK Hynix Hi-846 MIPI CSI-2 8M pixel sensor Martin Kepplinger
2021-05-31 23:13   ` Laurent Pinchart
2021-05-31 23:24     ` Laurent Pinchart
2021-05-31 12:07 ` [PATCH v3 3/5] media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera Martin Kepplinger
2021-06-01  0:14   ` Laurent Pinchart
2021-06-02 12:00     ` Martin Kepplinger
2021-06-02 17:57       ` Laurent Pinchart
2021-06-01  6:50   ` kernel test robot [this message]
2021-05-31 12:07 ` [PATCH v3 4/5] arm64: defconfig: enable VIDEO_HI846 Martin Kepplinger
2021-05-31 12:07 ` [PATCH v3 5/5] Documentation: i2c-cardlist: add the Hynix hi846 sensor Martin Kepplinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202106011430.eaaf2NGq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@puri.sm \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.kepplinger@puri.sm \
    --cc=mchehab@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=shawnx.tu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).