linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alistair Francis <alistair@alistair23.me>,
	linux-input@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: kbuild-all@lists.01.org, shawnguo@kernel.org,
	alistair23@gmail.com, robh+dt@kernel.org,
	linus.walleij@linaro.org, s.hauer@pengutronix.de,
	andreas@kemnade.info, krzysztof.kozlowski+dt@linaro.org,
	rydberg@bitmath.org, dmitry.torokhov@gmail.com,
	"Alistair Francis" <alistair@alistair23.me>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Peter Geis" <pgwipeout@gmail.com>
Subject: Re: [PATCH v8 1/4] Input: Add driver for Cypress Generation 5 touchscreen
Date: Sat, 6 Aug 2022 11:53:08 +0800	[thread overview]
Message-ID: <202208061128.pfj2DRWO-lkp@intel.com> (raw)
In-Reply-To: <20220802125827.34509-2-alistair@alistair23.me>

Hi Alistair,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on dtor-input/next]
[also build test WARNING on shawnguo/for-next linus/master v5.19 next-20220805]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alistair-Francis/Add-support-for-the-Cypress-cyttsp5/20220802-210032
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20220806/202208061128.pfj2DRWO-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/9c372983ef0b8eb7ad48c025a156f80943269af7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Alistair-Francis/Add-support-for-the-Cypress-cyttsp5/20220802-210032
        git checkout 9c372983ef0b8eb7ad48c025a156f80943269af7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=um SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/input/touchscreen/cyttsp5.c: In function 'cyttsp5_handle_irq':
>> drivers/input/touchscreen/cyttsp5.c:254:31: warning: array subscript 'int[0]' is partly outside array bounds of 'u8[1]' {aka 'unsigned char[1]'} [-Warray-bounds]
     254 |         for (nbyte = 0, *axis = 0; nbyte < size; nbyte++)
         |                         ~~~~~~^~~
   drivers/input/touchscreen/cyttsp5.c:333:12: note: while referencing 'num_cur_tch'
     333 |         u8 num_cur_tch;
         |            ^~~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:257:15: warning: array subscript 'int[0]' is partly outside array bounds of 'u8[1]' {aka 'unsigned char[1]'} [-Warray-bounds]
     257 |         *axis &= max - 1;
         |               ^~
   drivers/input/touchscreen/cyttsp5.c:333:12: note: while referencing 'num_cur_tch'
     333 |         u8 num_cur_tch;
         |            ^~~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:257:15: warning: array subscript 'int[0]' is partly outside array bounds of 'u8[1]' {aka 'unsigned char[1]'} [-Warray-bounds]
     257 |         *axis &= max - 1;
         |         ~~~~~~^~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:333:12: note: while referencing 'num_cur_tch'
     333 |         u8 num_cur_tch;
         |            ^~~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:255:23: warning: array subscript 'int[0]' is partly outside array bounds of 'u8[1]' {aka 'unsigned char[1]'} [-Warray-bounds]
     255 |                 *axis += ((xy_data[nbyte] >> bofs) << (nbyte * 8));
         |                       ^~
   drivers/input/touchscreen/cyttsp5.c:333:12: note: while referencing 'num_cur_tch'
     333 |         u8 num_cur_tch;
         |            ^~~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:255:23: warning: array subscript 'int[0]' is partly outside array bounds of 'u8[1]' {aka 'unsigned char[1]'} [-Warray-bounds]
     255 |                 *axis += ((xy_data[nbyte] >> bofs) << (nbyte * 8));
         |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/input/touchscreen/cyttsp5.c:333:12: note: while referencing 'num_cur_tch'
     333 |         u8 num_cur_tch;
         |            ^~~~~~~~~~~


vim +254 drivers/input/touchscreen/cyttsp5.c

   248	
   249	static void cyttsp5_get_touch_axis(int *axis, int size, int max, u8 *xy_data,
   250					   int bofs)
   251	{
   252		int nbyte;
   253	
 > 254		for (nbyte = 0, *axis = 0; nbyte < size; nbyte++)
   255			*axis += ((xy_data[nbyte] >> bofs) << (nbyte * 8));
   256	
   257		*axis &= max - 1;
   258	}
   259	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-08-06  3:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 12:58 [PATCH v8 0/4] Add support for the Cypress cyttsp5 Alistair Francis
2022-08-02 12:58 ` [PATCH v8 1/4] Input: Add driver for Cypress Generation 5 touchscreen Alistair Francis
2022-08-03  7:36   ` kernel test robot
2022-08-06  3:53   ` kernel test robot [this message]
2022-08-02 12:58 ` [PATCH v8 2/4] dt-bindings: input: Add Cypress TT2100 touchscreen controller Alistair Francis
2022-08-02 14:01   ` Rob Herring
2022-08-02 15:10   ` Rob Herring
2022-08-02 12:58 ` [PATCH v8 3/4] ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen Alistair Francis
2022-08-02 12:58 ` [PATCH v8 4/4] ARM: dts: imx7d-remarkable2: Enable the cyttsp5 Alistair Francis

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=202208061128.pfj2DRWO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=andreas@kemnade.info \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=mylene.josserand@bootlin.com \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).