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]
Message-ID: <202111151158.nlAtroXL-lkp@intel.com>
Date:   Mon, 15 Nov 2021 11:08:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gilles Talis <gilles.talis@...il.com>, jic23@...nel.org,
        lars@...afoo.de, pmeerw@...erw.net, robh+dt@...nel.org,
        linux-iio@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Gilles Talis <gilles.talis@...il.com>
Subject: Re: [PATCH 1/2] iio: humidity: Add support for Sensirion SHTC3 sensor

Hi Gilles,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on robh/for-next v5.16-rc1 next-20211112]
[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/Gilles-Talis/iio-humidity-add-support-for-Sensirion-SHTC3/20211114-212618
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: s390-randconfig-s032-20211115 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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-dirty
        # https://github.com/0day-ci/linux/commit/d4b528fcce840650354227c99ec7f6c0bdd076b0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gilles-Talis/iio-humidity-add-support-for-Sensirion-SHTC3/20211114-212618
        git checkout d4b528fcce840650354227c99ec7f6c0bdd076b0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/iio/humidity/shtc3.c:88:39: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [addressable] [usertype] cmd @@     got restricted __be16 @@
   drivers/iio/humidity/shtc3.c:88:39: sparse:     expected unsigned short [addressable] [usertype] cmd
   drivers/iio/humidity/shtc3.c:88:39: sparse:     got restricted __be16
>> drivers/iio/humidity/shtc3.c:88:56: sparse: sparse: Using plain integer as NULL pointer
   drivers/iio/humidity/shtc3.c:93:36: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [addressable] [usertype] cmd @@     got restricted __be16 @@
   drivers/iio/humidity/shtc3.c:93:36: sparse:     expected unsigned short [addressable] [usertype] cmd
   drivers/iio/humidity/shtc3.c:93:36: sparse:     got restricted __be16
   drivers/iio/humidity/shtc3.c:93:54: sparse: sparse: Using plain integer as NULL pointer
>> drivers/iio/humidity/shtc3.c:122:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] cmd @@     got restricted __be16 @@
   drivers/iio/humidity/shtc3.c:122:13: sparse:     expected unsigned short [usertype] cmd
   drivers/iio/humidity/shtc3.c:122:13: sparse:     got restricted __be16
   drivers/iio/humidity/shtc3.c:189:38: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [addressable] [usertype] cmd @@     got restricted __be16 @@
   drivers/iio/humidity/shtc3.c:189:38: sparse:     expected unsigned short [addressable] [usertype] cmd
   drivers/iio/humidity/shtc3.c:189:38: sparse:     got restricted __be16
   drivers/iio/humidity/shtc3.c:204:38: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [addressable] [usertype] cmd @@     got restricted __be16 @@
   drivers/iio/humidity/shtc3.c:204:38: sparse:     expected unsigned short [addressable] [usertype] cmd
   drivers/iio/humidity/shtc3.c:204:38: sparse:     got restricted __be16
   drivers/iio/humidity/shtc3.c:204:60: sparse: sparse: Using plain integer as NULL pointer

vim +88 drivers/iio/humidity/shtc3.c

    85	
    86	static int shtc3_sleep(struct i2c_client *client)
    87	{
  > 88		return shtc3_send_cmd(client, SHTC3_CMD_SLEEP, 0);
    89	}
    90	
    91	static int shtc3_wakeup(struct i2c_client *client)
    92	{
    93		if (shtc3_send_cmd(client, SHTC3_CMD_WAKEUP, 0) < 0)
    94			return -EIO;
    95	
    96		/* Wait for device to wake up */
    97		usleep_range(180, 240);
    98	
    99		return 0;
   100	}
   101	
   102	static int shtc3_read_channel(struct i2c_client *client, bool temp)
   103	{
   104		int ret;
   105		u16 cmd;
   106		u16 meas;
   107	
   108		ret = shtc3_wakeup(client);
   109		if (ret < 0)
   110			return ret;
   111	
   112		/*
   113		 * Sensor sends back measurement results after measurement command
   114		 * has been issued by the host.
   115		 * Sensor sends 3 bytes (2 bytes of data + 1 byte of CRC) for each
   116		 * channel sequentially
   117		 * The command issued by the host determines the channel for which
   118		 * the sensor will first send the data.
   119		 * We select the channel for which we need the results
   120		 * then only read back the 2 bytes corresponding to this channel.
   121		 */
 > 122		cmd = temp ? SHTC3_CMD_TEMP_MEAS_LP_CS : SHTC3_CMD_RH_MEAS_LP_CS;
   123		ret = shtc3_send_cmd(client, cmd, &meas);
   124		if (ret < 0)
   125			return ret;
   126	
   127		/* Go back to sleep */
   128		shtc3_sleep(client);
   129	
   130		return meas;
   131	}
   132	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (14470 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ