lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 6 Aug 2022 11:53:08 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alistair Francis <alistair@...stair23.me>,
        linux-input@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, shawnguo@...nel.org, alistair23@...il.com,
        robh+dt@...nel.org, linus.walleij@...aro.org,
        s.hauer@...gutronix.de, andreas@...nade.info,
        krzysztof.kozlowski+dt@...aro.org, rydberg@...math.org,
        dmitry.torokhov@...il.com,
        Alistair Francis <alistair@...stair23.me>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Mylène Josserand 
        <mylene.josserand@...tlin.com>, Peter Geis <pgwipeout@...il.com>
Subject: Re: [PATCH v8 1/4] Input: Add driver for Cypress Generation 5
 touchscreen

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ