From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Lothar Rubusch <l.rubusch@gmail.com>,
lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, eraretuya@gmail.com,
l.rubusch@gmail.com
Subject: Re: [PATCH v5 10/10] iio: accel: adxl345: add FIFO with watermark events
Date: Tue, 10 Dec 2024 11:47:37 +0300 [thread overview]
Message-ID: <dc914326-7eae-4e4a-8c93-ae1a7007bcc9@stanley.mountain> (raw)
In-Reply-To: <20241205171343.308963-11-l.rubusch@gmail.com>
Hi Lothar,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Lothar-Rubusch/iio-accel-adxl345-refrase-comment-on-probe/20241206-011802
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20241205171343.308963-11-l.rubusch%40gmail.com
patch subject: [PATCH v5 10/10] iio: accel: adxl345: add FIFO with watermark events
config: nios2-randconfig-r072-20241210 (https://download.01.org/0day-ci/archive/20241210/202412101132.Kj6R6i3h-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202412101132.Kj6R6i3h-lkp@intel.com/
smatch warnings:
drivers/iio/accel/adxl345_core.c:441 adxl345_event_handler() warn: unsigned 'int_stat' is never less than zero.
vim +/ret +321 drivers/iio/accel/adxl345_core.c
55d2386488598bb Lothar Rubusch 2024-12-05 433 static irqreturn_t adxl345_event_handler(int irq, void *p)
55d2386488598bb Lothar Rubusch 2024-12-05 434 {
55d2386488598bb Lothar Rubusch 2024-12-05 435 struct iio_dev *indio_dev = p;
55d2386488598bb Lothar Rubusch 2024-12-05 436 struct adxl345_state *st = iio_priv(indio_dev);
55d2386488598bb Lothar Rubusch 2024-12-05 437 u8 int_stat;
^^^^^^^^^^^
55d2386488598bb Lothar Rubusch 2024-12-05 438 int samples;
55d2386488598bb Lothar Rubusch 2024-12-05 439
55d2386488598bb Lothar Rubusch 2024-12-05 440 int_stat = adxl345_get_status(st);
55d2386488598bb Lothar Rubusch 2024-12-05 @441 if (int_stat < 0)
^^^^^^^^^^^^
signedness bug
55d2386488598bb Lothar Rubusch 2024-12-05 442 return IRQ_NONE;
55d2386488598bb Lothar Rubusch 2024-12-05 443
55d2386488598bb Lothar Rubusch 2024-12-05 444 if (int_stat == 0x0)
55d2386488598bb Lothar Rubusch 2024-12-05 445 goto err;
55d2386488598bb Lothar Rubusch 2024-12-05 446
55d2386488598bb Lothar Rubusch 2024-12-05 447 if (int_stat & ADXL345_INT_OVERRUN)
55d2386488598bb Lothar Rubusch 2024-12-05 448 goto err;
55d2386488598bb Lothar Rubusch 2024-12-05 449
55d2386488598bb Lothar Rubusch 2024-12-05 450 if (int_stat & (ADXL345_INT_DATA_READY | ADXL345_INT_WATERMARK)) {
55d2386488598bb Lothar Rubusch 2024-12-05 451 samples = adxl345_get_samples(st);
55d2386488598bb Lothar Rubusch 2024-12-05 452 if (samples < 0)
55d2386488598bb Lothar Rubusch 2024-12-05 453 goto err;
55d2386488598bb Lothar Rubusch 2024-12-05 454
55d2386488598bb Lothar Rubusch 2024-12-05 455 if (adxl345_fifo_push(indio_dev, samples) < 0)
55d2386488598bb Lothar Rubusch 2024-12-05 456 goto err;
55d2386488598bb Lothar Rubusch 2024-12-05 457
55d2386488598bb Lothar Rubusch 2024-12-05 458 }
55d2386488598bb Lothar Rubusch 2024-12-05 459 return IRQ_HANDLED;
55d2386488598bb Lothar Rubusch 2024-12-05 460
55d2386488598bb Lothar Rubusch 2024-12-05 461 err:
55d2386488598bb Lothar Rubusch 2024-12-05 462 adxl345_fifo_reset(st);
55d2386488598bb Lothar Rubusch 2024-12-05 463
55d2386488598bb Lothar Rubusch 2024-12-05 464 return IRQ_HANDLED;
55d2386488598bb Lothar Rubusch 2024-12-05 465 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-10 8:47 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 17:13 [PATCH v5 00/10] iio: accel: adxl345: add FIFO operating with IRQ triggered watermark events Lothar Rubusch
2024-12-05 17:13 ` [PATCH v5 01/10] iio: accel: adxl345: refrase comment on probe Lothar Rubusch
2024-12-08 13:26 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 02/10] iio: accel: adxl345: rename variable data to st Lothar Rubusch
2024-12-08 13:27 ` Jonathan Cameron
2024-12-10 17:31 ` Lothar Rubusch
2024-12-11 18:42 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 03/10] iio: accel: adxl345: measure right-justified Lothar Rubusch
2024-12-08 13:34 ` Jonathan Cameron
2024-12-09 22:18 ` Lothar Rubusch
2024-12-11 18:55 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 04/10] iio: accel: adxl345: add function to switch measuring mode Lothar Rubusch
2024-12-08 13:42 ` Jonathan Cameron
2024-12-10 17:49 ` Lothar Rubusch
2024-12-05 17:13 ` [PATCH v5 05/10] iio: accel: adxl345: complete list of defines Lothar Rubusch
2024-12-08 16:11 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 06/10] dt-bindings: iio: accel: add interrupt-names Lothar Rubusch
2024-12-05 17:53 ` Conor Dooley
2024-12-05 19:41 ` Lothar Rubusch
2024-12-06 17:07 ` Conor Dooley
2024-12-06 17:29 ` Lothar Rubusch
2024-12-07 12:10 ` Lothar Rubusch
2024-12-08 13:21 ` Jonathan Cameron
2024-12-08 13:14 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 07/10] iio: accel: adxl345: introduce interrupt handling Lothar Rubusch
2024-12-08 16:14 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 08/10] iio: accel: adxl345: initialize FIFO delay value for SPI Lothar Rubusch
2024-12-08 16:16 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 09/10] iio: accel: adxl345: prepare channel for scan_index Lothar Rubusch
2024-12-08 16:17 ` Jonathan Cameron
2024-12-05 17:13 ` [PATCH v5 10/10] iio: accel: adxl345: add FIFO with watermark events Lothar Rubusch
2024-12-08 16:34 ` Jonathan Cameron
2024-12-10 21:54 ` Lothar Rubusch
2024-12-11 19:14 ` Jonathan Cameron
2024-12-11 22:32 ` Lothar Rubusch
2024-12-10 8:47 ` Dan Carpenter [this message]
2024-12-11 19:15 ` Jonathan Cameron
2024-12-11 18:53 ` [PATCH v5 00/10] iio: accel: adxl345: add FIFO operating with IRQ triggered " Jonathan Cameron
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=dc914326-7eae-4e4a-8c93-ae1a7007bcc9@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Michael.Hennerich@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eraretuya@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=l.rubusch@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=robh@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