Re: [PATCH v7 2/4] iio: adc: Add Xilinx AMS driver
From: kernel test robot <hidden>
Date: 2021-10-24 14:28:24
Also in:
lkml, oe-kbuild-all
Hi Anand, Thank you for the patch! Yet something to improve: [auto build test ERROR on jic23-iio/togreg] [also build test ERROR on linux/master linus/master v5.15-rc6 next-20211022] [cannot apply to xilinx-xlnx/master] [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/Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211019-232329 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) 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/45c8517776bf5aaacb7146a05b929f77b9d5d29f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Anand-Ashok-Dumbre/Add-Xilinx-AMS-Driver/20211019-232329 git checkout 45c8517776bf5aaacb7146a05b929f77b9d5d29f # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All errors (new ones prefixed by >>): In file included from include/linux/swab.h:5, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/arc/include/uapi/asm/byteorder.h:14, from include/asm-generic/bitops/le.h:7, from arch/arc/include/asm/bitops.h:193, from include/linux/bitops.h:33, from include/linux/kernel.h:12, from include/linux/clk.h:13, from drivers/iio/adc/xilinx-ams.c:11: drivers/iio/adc/xilinx-ams.c: In function 'ams_update_intrmask':
quoted
drivers/iio/adc/xilinx-ams.c:314:18: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~~~~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:314:9: note: in expansion of macro 'writel'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~quoted
include/linux/bits.h:35:29: error: left shift count >= width of type [-Werror=shift-count-overflow]
35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \
| ^~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:314:9: note: in expansion of macro 'writel'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:314:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:314:9: note: in expansion of macro 'writel'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:314:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:35:29: error: left shift count >= width of type [-Werror=shift-count-overflow]
35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \
| ^~
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:314:9: note: in expansion of macro 'writel'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:314:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:314:9: note: in expansion of macro 'writel'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:314:28: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
314 | writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:35:29: error: left shift count >= width of type [-Werror=shift-count-overflow]
35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \
| ^~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:317:9: note: in expansion of macro 'writel'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:317:26: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:317:9: note: in expansion of macro 'writel'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:317:26: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:35:29: error: left shift count >= width of type [-Werror=shift-count-overflow]
35 | (((~UL(0)) - (UL(1) << (l)) + 1) & \
| ^~
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:317:9: note: in expansion of macro 'writel'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:317:26: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:317:9: note: in expansion of macro 'writel'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:126:41: note: in expansion of macro 'GENMASK'
126 | #define AMS_ISR1_INTR_MASK GENMASK(63, 32)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:317:26: note: in expansion of macro 'AMS_ISR1_INTR_MASK'
317 | writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
| ^~~~~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c: In function 'ams_enable_channel_sequence':quoted
drivers/iio/adc/xilinx-ams.c:86:41: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
86 | #define AMS_CONF1_SEQ_DEFAULT FIELD_PREP(AMS_CONF1_SEQ_MASK, 0)
| ^~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:404:35: note: in expansion of macro 'AMS_CONF1_SEQ_DEFAULT'
404 | AMS_CONF1_SEQ_DEFAULT);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitops.h:6,
from include/linux/kernel.h:12,
from include/linux/clk.h:13,
from drivers/iio/adc/xilinx-ams.c:11:quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:95:41: note: in expansion of macro 'GENMASK'
95 | #define AMS_PL_SEQ_MASK GENMASK(59, 22)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:423:39: note: in expansion of macro 'AMS_PL_SEQ_MASK'
423 | scan_mask = FIELD_GET(AMS_PL_SEQ_MASK, scan_mask);
| ^~~~~~~~~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/arc/include/uapi/asm/byteorder.h:14,
from include/asm-generic/bitops/le.h:7,
from arch/arc/include/asm/bitops.h:193,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from include/linux/clk.h:13,
from drivers/iio/adc/xilinx-ams.c:11:quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:118:39: note: in definition of macro '__swab32'
118 | (__builtin_constant_p((__u32)(x)) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:428:17: note: in expansion of macro 'writel'
428 | writel(FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:92:41: note: in expansion of macro 'GENMASK'
92 | #define AMS_REG_SEQ1_MASK GENMASK(37, 22)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:428:34: note: in expansion of macro 'AMS_REG_SEQ1_MASK'
428 | writel(FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask),
| ^~~~~~~~~~~~~~~~~quoted
include/linux/bits.h:36:18: error: right shift count is negative [-Werror=shift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/arc/include/asm/io.h:209:47: note: in expansion of macro 'writel_relaxed'
209 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
| ^~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:428:17: note: in expansion of macro 'writel'
428 | writel(FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask),
| ^~~~~~
include/linux/bits.h:38:38: note: in expansion of macro '__GENMASK'
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:92:41: note: in expansion of macro 'GENMASK'
92 | #define AMS_REG_SEQ1_MASK GENMASK(37, 22)
| ^~~~~~~
drivers/iio/adc/xilinx-ams.c:428:34: note: in expansion of macro 'AMS_REG_SEQ1_MASK'
428 | writel(FIELD_GET(AMS_REG_SEQ1_MASK, scan_mask),
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/FIELD_GET +314 drivers/iio/adc/xilinx-ams.c
307
308 static void ams_update_intrmask(struct ams *ams, u64 mask, u64 val)
309 {
310 ams->intr_mask &= ~mask;
311 ams->intr_mask |= (val & mask);
312
313 writel(~(ams->intr_mask | ams->masked_alarm), ams->base + AMS_IER_0);
> 314 writel(~(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask)),
315 ams->base + AMS_IER_1);
316 writel(ams->intr_mask | ams->masked_alarm, ams->base + AMS_IDR_0);
317 writel(FIELD_GET(AMS_ISR1_INTR_MASK, ams->intr_mask),
318 ams->base + AMS_IDR_1);
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 69238 bytes