Re: [PATCH v6 1/2] iio: frequency: adrf6780: add support for ADRF6780

From: kernel test robot
Date: Sun Jul 18 2021 - 20:36:16 EST


Hi Antoniu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on linux/master linus/master v5.14-rc1 next-20210716]
[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/Antoniu-Miclaus/iio-frequency-adrf6780-add-support-for-ADRF6780/20210718-104320
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.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/59f8f05a22397c9b919c512d1e28cbad5caf78a7
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Antoniu-Miclaus/iio-frequency-adrf6780-add-support-for-ADRF6780/20210718-104320
git checkout 59f8f05a22397c9b919c512d1e28cbad5caf78a7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

drivers/iio/frequency/adrf6780.c: In function 'adrf6780_read_voltage_raw':
>> drivers/iio/frequency/adrf6780.c:161:17: error: invalid operands to binary & (have 'unsigned int *' and 'long unsigned int')
161 | if (!(read_val & ADRF6780_ADC_STATUS_MSK)) {
| ^


vim +161 drivers/iio/frequency/adrf6780.c

138
139 static int adrf6780_read_voltage_raw(struct adrf6780_dev *dev, unsigned int *read_val)
140 {
141 int ret;
142
143 mutex_lock(&dev->lock);
144
145 ret = adrf6780_spi_update_bits(dev, ADRF6780_REG_ADC_CONTROL,
146 ADRF6780_ADC_EN_MSK |
147 ADRF6780_ADC_CLOCK_EN_MSK |
148 ADRF6780_ADC_START_MSK,
149 FIELD_PREP(ADRF6780_ADC_EN_MSK, 1) |
150 FIELD_PREP(ADRF6780_ADC_CLOCK_EN_MSK, 1) |
151 FIELD_PREP(ADRF6780_ADC_START_MSK, 1));
152 if (ret)
153 goto exit;
154
155 usleep_range(200, 250);
156
157 ret = adrf6780_spi_read(dev, ADRF6780_REG_ADC_OUTPUT, read_val);
158 if (ret)
159 goto exit;
160
> 161 if (!(read_val & ADRF6780_ADC_STATUS_MSK)) {
162 ret = -EINVAL;
163 goto exit;
164 }
165
166 ret = adrf6780_spi_update_bits(dev, ADRF6780_REG_ADC_CONTROL,
167 ADRF6780_ADC_START_MSK,
168 FIELD_PREP(ADRF6780_ADC_START_MSK, 0));
169 if (ret)
170 goto exit;
171
172 ret = adrf6780_spi_read(dev, ADRF6780_REG_ADC_OUTPUT, read_val);
173
174 exit:
175 mutex_unlock(&dev->lock);
176 return ret;
177 }
178

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip