tree:
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: 4f9a05eff1263f96157471d75a8f3c9362947b06
commit: 1b996912c849d921a1763f817723d419be561803 [25/36] iio: sx9310: Use long instead of
int for channel bitmaps
compiler: xtensa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
> drivers/iio/proximity/sx9310.c:557:25: warning: Clarify
calculation precedence for '&' and '?'. [clarifyCalculation]
dir = val & BIT(chan) ? IIO_EV_DIR_FALLING : IIO_EV_DIR_RISING;
^
vim +557 drivers/iio/proximity/sx9310.c
531
532 static void sx9310_push_events(struct iio_dev *indio_dev)
533 {
534 int ret;
535 unsigned int val, chan;
536 struct sx9310_data *data = iio_priv(indio_dev);
537 s64 timestamp = iio_get_time_ns(indio_dev);
538 unsigned long prox_changed;
539
540 /* Read proximity state on all channels */
541 ret = regmap_read(data->regmap, SX9310_REG_STAT0, &val);
542 if (ret < 0) {
543 dev_err(&data->client->dev, "i2c transfer error in irq\n");
544 return;
545 }
546
547 /*
548 * Only iterate over channels with changes on proximity status that have
549 * events enabled.
550 */
551 prox_changed = (data->chan_prox_stat ^ val) & data->chan_event;
552
553 for_each_set_bit(chan, &prox_changed, SX9310_NUM_CHANNELS) {
554 int dir;
555 u64 ev;
556
557 dir = val & BIT(chan) ? IIO_EV_DIR_FALLING :
IIO_EV_DIR_RISING;
558 ev = IIO_UNMOD_EVENT_CODE(IIO_PROXIMITY, chan,
559 IIO_EV_TYPE_THRESH, dir);
560
561 iio_push_event(indio_dev, ev, timestamp);
562 }
563 data->chan_prox_stat = val;
564 }
565
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org