[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202208031503.3PE5bw9a-lkp@intel.com>
Date: Wed, 3 Aug 2022 15:36:27 +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 hid/for-next shawnguo/for-next linus/master v5.19 next-20220802]
[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: nios2-randconfig-s031-20220803 (https://download.01.org/0day-ci/archive/20220803/202208031503.3PE5bw9a-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# 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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/input/touchscreen/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/input/touchscreen/cyttsp5.c:602:36: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le16 [usertype] hid_desc_register @@ got int @@
drivers/input/touchscreen/cyttsp5.c:602:36: sparse: expected restricted __le16 [usertype] hid_desc_register
drivers/input/touchscreen/cyttsp5.c:602:36: sparse: got int
vim +602 drivers/input/touchscreen/cyttsp5.c
597
598 static int cyttsp5_get_hid_descriptor(struct cyttsp5 *ts,
599 struct cyttsp5_hid_desc *desc)
600 {
601 struct device *dev = ts->dev;
> 602 __le16 hid_desc_register = HID_DESC_REG;
603 int rc;
604 u8 cmd[2];
605
606 /* Set HID descriptor register */
607 memcpy(cmd, &hid_desc_register, sizeof(hid_desc_register));
608
609 rc = cyttsp5_write(ts, HID_DESC_REG, NULL, 0);
610 if (rc) {
611 dev_err(dev, "Failed to get HID descriptor, rc=%d\n", rc);
612 return rc;
613 }
614
615 rc = wait_for_completion_interruptible_timeout(&ts->cmd_done,
616 msecs_to_jiffies(CY_HID_GET_HID_DESCRIPTOR_TIMEOUT_MS));
617 if (rc <= 0) {
618 dev_err(ts->dev, "HID get descriptor timed out\n");
619 rc = -ETIMEDOUT;
620 return rc;
621 }
622
623 memcpy(desc, ts->response_buf, sizeof(*desc));
624
625 /* Check HID descriptor length and version */
626 if (le16_to_cpu(desc->hid_desc_len) != sizeof(*desc) ||
627 le16_to_cpu(desc->bcd_version) != HID_VERSION) {
628 dev_err(dev, "Unsupported HID version\n");
629 return -ENODEV;
630 }
631
632 return 0;
633 }
634
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists