devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Anshul Dalal <anshulusr@gmail.com>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Anshul Dalal <anshulusr@gmail.com>,
	Conor Dooley <conor+dt@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH v3 3/3] iio: chemical: add support for Aosong AGS02MA
Date: Sat, 25 Nov 2023 17:10:06 +0800	[thread overview]
Message-ID: <202311251636.m0yt3fIb-lkp@intel.com> (raw)
In-Reply-To: <20231121095800.2180870-3-anshulusr@gmail.com>

Hi Anshul,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.7-rc2 next-20231124]
[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/Anshul-Dalal/dt-bindings-iio-chemical-add-aosong-ags02ma/20231121-180435
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20231121095800.2180870-3-anshulusr%40gmail.com
patch subject: [PATCH v3 3/3] iio: chemical: add support for Aosong AGS02MA
config: arm-randconfig-r081-20231123 (https://download.01.org/0day-ci/archive/20231125/202311251636.m0yt3fIb-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231125/202311251636.m0yt3fIb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311251636.m0yt3fIb-lkp@intel.com/

New smatch warnings:
drivers/iio/chemical/ags02ma.c:53 ags02ma_register_read() warn: unsigned 'ret' is never less than zero.

Old smatch warnings:
drivers/iio/chemical/ags02ma.c:63 ags02ma_register_read() warn: unsigned 'ret' is never less than zero.

vim +/ret +53 drivers/iio/chemical/ags02ma.c

    45	
    46	static u32 ags02ma_register_read(struct i2c_client *client, u8 reg, u16 delay)
    47	{
    48		u32 ret;
    49		u8 crc;
    50		struct ags02ma_reading read_buffer;
    51	
    52		ret = i2c_master_send(client, &reg, sizeof(reg));
  > 53		if (ret < 0) {
    54			dev_err(&client->dev,
    55				"Failed to send data to register 0x%x: %d", reg, ret);
    56			return ret;
    57		}
    58	
    59		/* Processing Delay, Check Table 7.7 in the datasheet */
    60		msleep_interruptible(delay);
    61	
    62		ret = i2c_master_recv(client, (u8 *)&read_buffer, sizeof(read_buffer));
    63		if (ret < 0) {
    64			dev_err(&client->dev,
    65				"Failed to receive from register 0x%x: %d", reg, ret);
    66			return ret;
    67		}
    68		ret = be32_to_cpu(read_buffer.data);
    69	
    70		crc = crc8(ags02ma_crc8_table, (u8 *)&read_buffer.data,
    71			   sizeof(read_buffer.data), AGS02MA_CRC8_INIT);
    72		if (crc != read_buffer.crc) {
    73			dev_err(&client->dev, "CRC error\n");
    74			return -EIO;
    75		}
    76	
    77		return ret;
    78	}
    79	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2023-11-25  9:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  9:57 [PATCH v3 1/3] dt-bindings: vendor-prefixes: add aosong Anshul Dalal
2023-11-21  9:57 ` [PATCH v3 2/3] dt-bindings: iio: chemical: add aosong,ags02ma Anshul Dalal
2023-11-21 10:03   ` Krzysztof Kozlowski
2023-11-21 10:12     ` Anshul Dalal
2023-11-21  9:57 ` [PATCH v3 3/3] iio: chemical: add support for Aosong AGS02MA Anshul Dalal
2023-11-24  7:56   ` kernel test robot
2023-11-25  9:10   ` kernel test robot [this message]
2023-11-21 10:02 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: add aosong Krzysztof Kozlowski

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=202311251636.m0yt3fIb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anshulusr@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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).