Hi Caleb,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on jic23-iio/togreg lee-mfd/for-mfd-next linus/master v5.17-rc4
next-20220215]
[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]
url:
https://github.com/0day-ci/linux/commits/Caleb-Connolly/iio-adc-introduce...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allmodconfig
(
https://download.01.org/0day-ci/archive/20220216/202202161429.mqmnE8To-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/c0b026333a7bf04ff90864bda97632b87...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Caleb-Connolly/iio-adc-introduce-Qualcomm-SPMI-Round-Robin-ADC/20220216-011807
git checkout c0b026333a7bf04ff90864bda97632b87fa5a090
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=arm SHELL=/bin/bash drivers/iio/adc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/iio/adc/qcom-spmi-rradc.c:15:
drivers/iio/adc/qcom-spmi-rradc.c: In function 'rradc_read_raw':
> drivers/iio/adc/qcom-spmi-rradc.c:742:36: warning: format
'%d' expects argument of type 'int', but argument 3 has type 'long
unsigned int' [-Wformat=]
742 | dev_err(chip->dev,
"Invalid channel index:%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro
'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt),
##__VA_ARGS__)
| ^~~~~~~
drivers/iio/adc/qcom-spmi-rradc.c:742:17: note: in expansion of macro
'dev_err'
742 | dev_err(chip->dev, "Invalid channel index:%d\n",
| ^~~~~~~
drivers/iio/adc/qcom-spmi-rradc.c:742:60: note: format string is defined here
742 | dev_err(chip->dev, "Invalid channel index:%d\n",
| ~^
| |
| int
| %ld
vim +742 drivers/iio/adc/qcom-spmi-rradc.c
731
732 static int rradc_read_raw(struct iio_dev *indio_dev,
733 struct iio_chan_spec const *chan_spec, int *val,
734 int *val2, long mask)
735 {
736 struct rradc_chip *chip = iio_priv(indio_dev);
737 const struct rradc_channel *chan;
738 int ret;
739 u16 adc_code;
740
741 if (chan_spec->address >= RR_ADC_CHAN_MAX) {
742 dev_err(chip->dev, "Invalid channel index:%d\n",
743 chan_spec->address);
744 return -EINVAL;
745 }
746
747 switch (mask) {
748 case IIO_CHAN_INFO_SCALE:
749 return rradc_read_scale(chip, chan_spec->address, val, val2);
750 case IIO_CHAN_INFO_OFFSET:
751 return rradc_read_offset(chip, chan_spec->address, val);
752 case IIO_CHAN_INFO_RAW:
753 chan = &rradc_chans[chan_spec->address];
754 ret = rradc_do_conversion(chip, chan_spec->address, &adc_code);
755 if (ret < 0)
756 return ret;
757
758 *val = adc_code;
759 return IIO_VAL_INT;
760 case IIO_CHAN_INFO_PROCESSED:
761 chan = &rradc_chans[chan_spec->address];
762 if (!chan->scale_fn)
763 return -EINVAL;
764 ret = rradc_do_conversion(chip, chan_spec->address, &adc_code);
765 if (ret < 0)
766 return ret;
767
768 *val = chan->scale_fn(chip, adc_code, val);
769 return IIO_VAL_INT;
770 default:
771 return -EINVAL;
772 }
773 }
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org