[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202311251636.m0yt3fIb-lkp@intel.com>
Date: Sat, 25 Nov 2023 17:10:06 +0800
From: kernel test robot <lkp@...el.com>
To: Anshul Dalal <anshulusr@...il.com>, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Anshul Dalal <anshulusr@...il.com>,
Conor Dooley <conor+dt@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
linux-kernel-mentees@...ts.linuxfoundation.org,
Jonathan Cameron <jic23@...nel.org>
Subject: Re: [PATCH v3 3/3] iio: chemical: add support for Aosong AGS02MA
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@...el.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, ®, 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
Powered by blists - more mailing lists