[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202505100631.nlBOlbYm-lkp@intel.com>
Date: Sat, 10 May 2025 06:58:21 +0800
From: kernel test robot <lkp@...el.com>
To: Andrew Ijano <andrew.ijano@...il.com>, jic23@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, andrew.lopes@...mni.usp.br,
gustavobastos@....br, dlechner@...libre.com, nuno.sa@...log.com,
andy@...nel.org, jstephan@...libre.com, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] iio: accel: sca3000: replace usages of internal read
data helpers by spi helpers
Hi Andrew,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.15-rc5 next-20250509]
[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/Andrew-Ijano/iio-accel-sca3000-replace-usages-of-internal-read-data-helpers-by-spi-helpers/20250509-094127
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20250509013931.47524-1-andrew.lopes%40alumni.usp.br
patch subject: [PATCH v3] iio: accel: sca3000: replace usages of internal read data helpers by spi helpers
config: i386-randconfig-r123-20250510 (https://download.01.org/0day-ci/archive/20250510/202505100631.nlBOlbYm-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505100631.nlBOlbYm-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/202505100631.nlBOlbYm-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/accel/sca3000.c:745:46: sparse: sparse: cast to restricted __be16
drivers/iio/accel/sca3000.c:756:33: sparse: sparse: cast to restricted __be16
vim +745 drivers/iio/accel/sca3000.c
720
721 static int sca3000_read_raw(struct iio_dev *indio_dev,
722 struct iio_chan_spec const *chan,
723 int *val,
724 int *val2,
725 long mask)
726 {
727 struct sca3000_state *st = iio_priv(indio_dev);
728 int ret;
729 u8 address;
730
731 switch (mask) {
732 case IIO_CHAN_INFO_RAW:
733 mutex_lock(&st->lock);
734 if (chan->type == IIO_ACCEL) {
735 if (st->mo_det_use_count) {
736 mutex_unlock(&st->lock);
737 return -EBUSY;
738 }
739 address = sca3000_addresses[chan->address][0];
740 ret = spi_w8r16(st->us, SCA3000_READ_REG(address));
741 if (ret < 0) {
742 mutex_unlock(&st->lock);
743 return ret;
744 }
> 745 *val = sign_extend32(be16_to_cpu((__be16) ret) >>
746 chan->scan_type.shift,
747 chan->scan_type.realbits - 1);
748 } else {
749 /* get the temperature when available */
750 ret = spi_w8r16(st->us,
751 SCA3000_READ_REG(SCA3000_REG_TEMP_MSB_ADDR));
752 if (ret < 0) {
753 mutex_unlock(&st->lock);
754 return ret;
755 }
756 *val = (be16_to_cpu((__be16) ret) >>
757 chan->scan_type.shift) &
758 GENMASK(chan->scan_type.realbits - 1, 0);
759 }
760 mutex_unlock(&st->lock);
761 return IIO_VAL_INT;
762 case IIO_CHAN_INFO_SCALE:
763 *val = 0;
764 if (chan->type == IIO_ACCEL)
765 *val2 = st->info->scale;
766 else /* temperature */
767 *val2 = 555556;
768 return IIO_VAL_INT_PLUS_MICRO;
769 case IIO_CHAN_INFO_OFFSET:
770 *val = -214;
771 *val2 = 600000;
772 return IIO_VAL_INT_PLUS_MICRO;
773 case IIO_CHAN_INFO_SAMP_FREQ:
774 mutex_lock(&st->lock);
775 ret = sca3000_read_raw_samp_freq(st, val);
776 mutex_unlock(&st->lock);
777 return ret ? ret : IIO_VAL_INT;
778 case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
779 mutex_lock(&st->lock);
780 ret = sca3000_read_3db_freq(st, val);
781 mutex_unlock(&st->lock);
782 return ret;
783 default:
784 return -EINVAL;
785 }
786 }
787
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists