linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gilles Talis <gilles.talis@gmail.com>,
	jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net,
	robh+dt@kernel.org, linux-iio@vger.kernel.org
Cc: kbuild-all@lists.01.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Gilles Talis <gilles.talis@gmail.com>
Subject: Re: [PATCH 1/2] iio: humidity: Add support for Sensirion SHTC3 sensor
Date: Mon, 15 Nov 2021 11:08:04 +0800	[thread overview]
Message-ID: <202111151158.nlAtroXL-lkp@intel.com> (raw)
In-Reply-To: <20211114132335.47651-2-gilles.talis@gmail.com>

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

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

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

  parent reply	other threads:[~2021-11-15  3:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 13:23 [PATCH 0/2] iio: humidity: add support for Sensirion SHTC3 Gilles Talis
2021-11-14 13:23 ` [PATCH 1/2] iio: humidity: Add support for Sensirion SHTC3 sensor Gilles Talis
2021-11-14 13:47   ` Lars-Peter Clausen
     [not found]     ` <CAKcgs2x7FCf8xBj-PQ62UQNgkxBjFfQznEVCysNO547Yr5Ct3w@mail.gmail.com>
2021-11-14 16:49       ` Jonathan Cameron
2021-11-15  7:29         ` Gilles Talis
2021-11-15  3:08   ` kernel test robot [this message]
2021-11-14 13:23 ` [PATCH 2/2] dt-bindings: trivial-devices: Add Sensirion SHTC3 humidity sensor Gilles Talis
2021-11-15  2:10   ` Rob Herring

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=202111151158.nlAtroXL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gilles.talis@gmail.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@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).