Re: [PATCH 2/2] iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
From: kernel test robot
Date: Fri Mar 27 2026 - 05:14:30 EST
Hi David,
kernel test robot noticed the following build errors:
[auto build test ERROR on ff0843ceb1fb11a6b73e0e77b932ef7967aecd4b]
url: https://github.com/intel-lab-lkp/linux/commits/David-Lechner/iio-adc-ti-adc161s626-fix-buffer-read-on-big-endian/20260315-092711
base: ff0843ceb1fb11a6b73e0e77b932ef7967aecd4b
patch link: https://lore.kernel.org/r/20260314-iio-adc-ti-adc161s626-fix-scan-buf-v1-2-56243b11e87b%40baylibre.com
patch subject: [PATCH 2/2] iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20260327/202603271734.pnWuSmNr-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260327/202603271734.pnWuSmNr-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603271734.pnWuSmNr-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/iio/adc/ti-adc161s626.c: In function 'ti_adc_read_measurement':
>> drivers/iio/adc/ti-adc161s626.c:87:24: error: implicit declaration of function 'get_unaligned_be16' [-Wimplicit-function-declaration]
87 | *val = get_unaligned_be16(data->buf);
| ^~~~~~~~~~~~~~~~~~
>> drivers/iio/adc/ti-adc161s626.c:94:24: error: implicit declaration of function 'get_unaligned_be24' [-Wimplicit-function-declaration]
94 | *val = get_unaligned_be24(data->buf);
| ^~~~~~~~~~~~~~~~~~
vim +/get_unaligned_be16 +87 drivers/iio/adc/ti-adc161s626.c
75
76 static int ti_adc_read_measurement(struct ti_adc_data *data,
77 struct iio_chan_spec const *chan, int *val)
78 {
79 int ret;
80
81 switch (data->read_size) {
82 case 2:
83 ret = spi_read(data->spi, data->buf, 2);
84 if (ret)
85 return ret;
86
> 87 *val = get_unaligned_be16(data->buf);
88 break;
89 case 3:
90 ret = spi_read(data->spi, data->buf, 3);
91 if (ret)
92 return ret;
93
> 94 *val = get_unaligned_be24(data->buf);
95 break;
96 default:
97 return -EINVAL;
98 }
99
100 *val = sign_extend32(*val >> data->shift, chan->scan_type.realbits - 1);
101
102 return 0;
103 }
104
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki