[xlnx:xlnx_rebase_v5.10 137/1761] drivers/misc/xilinx_flex_pm.c:235:53: error: too many arguments to function call, expected 2, have 3
kernel test robot
lkp at intel.com
Thu Aug 12 01:04:54 PDT 2021
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: e14d4574ca81a569ee6d07e03271f2ae2dad38e4
commit: a488ba0fdc7388872e2b5ae378612d4e7ea70cb0 [137/1761] misc: xilinx_flex: Add support for the flex noc Performance Monitor
config: s390-randconfig-r012-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/a488ba0fdc7388872e2b5ae378612d4e7ea70cb0
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout a488ba0fdc7388872e2b5ae378612d4e7ea70cb0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/crypto/xilinx/ drivers/fpga/ drivers/media/i2c/ drivers/misc/ drivers/net/ethernet/xilinx/ drivers/regulator/ drivers/s390/net/ drivers/s390/scsi/ drivers/staging/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/misc/xilinx_flex_pm.c:10:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/misc/xilinx_flex_pm.c:10:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/misc/xilinx_flex_pm.c:10:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/misc/xilinx_flex_pm.c:10:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/misc/xilinx_flex_pm.c:10:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/misc/xilinx_flex_pm.c:235:53: error: too many arguments to function call, expected 2, have 3
ret = zynqmp_pm_probe_counter_write(domain, reg, val);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~
include/linux/firmware/xlnx-zynqmp.h:914:19: note: 'zynqmp_pm_probe_counter_write' declared here
static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
^
drivers/misc/xilinx_flex_pm.c:252:53: error: too many arguments to function call, expected 2, have 3
ret = zynqmp_pm_probe_counter_write(domain, reg, val);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~
include/linux/firmware/xlnx-zynqmp.h:914:19: note: 'zynqmp_pm_probe_counter_write' declared here
static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
^
20 warnings and 2 errors generated.
vim +235 drivers/misc/xilinx_flex_pm.c
152
153 /**
154 * xflex_sysfs_cmd - Implements sysfs operations
155 * @dev: Device structure
156 * @buf: Value to write
157 * @cmd: sysfs cmd
158 *
159 * Return: value read from the sysfs cmd on success and negative error code
160 * otherwise.
161 */
162 static int xflex_sysfs_cmd(struct device *dev, const char *buf,
163 enum xflex_sysfs_cmd_codes cmd)
164 {
165 struct xflex_dev_info *flexpm = to_xflex_dev_info(dev);
166 u32 domain, src, offset, reg, val, counter;
167 int ret;
168 u32 pm_api_ret[4] = {0, 0, 0, 0};
169
170 mutex_lock(&flexpm->mutex);
171
172 switch (cmd) {
173 case XFLEX_GET_COUNTER_LPD_WRRSP:
174 reg = flexpm->counterid_lpd | FPM_WRRSP_L | FPM_VAL;
175 domain = FPM_LPD;
176
177 break;
178
179 case XFLEX_GET_COUNTER_LPD_WRREQ:
180 reg = flexpm->counterid_lpd | FPM_WRRSP_L | FPM_VAL;
181 domain = FPM_LPD;
182
183 break;
184
185 case XFLEX_GET_COUNTER_LPD_RDRSP:
186 reg = flexpm->counterid_lpd | FPM_RDRSP_L | FPM_VAL;
187 domain = FPM_LPD;
188
189 break;
190
191 case XFLEX_GET_COUNTER_LPD_RDREQ:
192 reg = flexpm->counterid_lpd | FPM_RDREQ_L | FPM_VAL;
193 domain = FPM_LPD;
194
195 break;
196
197 case XFLEX_SET_COUNTER_LPD:
198 ret = kstrtou32(buf, 0, &val);
199 if (ret < 0)
200 goto exit_unlock;
201
202 flexpm->counterid_lpd = val;
203 reset_default(dev, val, FPM_LPD);
204 break;
205
206 case XFLEX_SET_PORT_COUNTER_FPD:
207 ret = kstrtou32(buf, 0, &val);
208 if (ret < 0)
209 goto exit_unlock;
210
211 counter = flexpm->counterid_fpd * FPM_COUNTER_OFFSET;
212 offset = FPM_PORT_SEL_OFFSET + counter * FPM_COUNTER_OFFSET;
213 fpm_reg(flexpm->basefpd, val, offset);
214 break;
215
216 case XFLEX_SET_PORT_COUNTER_LPD:
217 ret = kstrtou32(buf, 0, &val);
218 if (ret < 0)
219 goto exit_unlock;
220
221 counter = flexpm->counterid_lpd * FPM_COUNTER_OFFSET;
222 offset = FPM_PORT_SEL_OFFSET + counter * FPM_COUNTER_OFFSET;
223 fpm_reg(flexpm->baselpd, val, offset);
224 break;
225
226 case XFLEX_SET_SRC_COUNTER_LPD:
227 reg = flexpm->counterid_lpd;
228 domain = FPM_LPD;
229 ret = kstrtou32(buf, 0, &val);
230 if (ret < 0)
231 goto exit_unlock;
232
233 for (src = 0; src < FPM_NUM_COUNTERS; src++) {
234 reg = reg | FPM_SRC | (src << FPM_PROBE_SHIFT);
> 235 ret = zynqmp_pm_probe_counter_write(domain, reg, val);
236 if (ret < 0) {
237 dev_err(dev, "Counter write error %d\n", ret);
238 goto exit_unlock;
239 }
240 }
241 break;
242
243 case XFLEX_SET_SRC_COUNTER_FPD:
244 reg = flexpm->counterid_fpd;
245 domain = FPM_FPD;
246 ret = kstrtou32(buf, 0, &val);
247 if (ret < 0)
248 goto exit_unlock;
249
250 for (src = 0; src < FPM_NUM_COUNTERS; src++) {
251 reg = reg | FPM_SRC | (src << FPM_PROBE_SHIFT);
252 ret = zynqmp_pm_probe_counter_write(domain, reg, val);
253 if (ret < 0) {
254 dev_err(dev, "Counter write error %d\n", ret);
255 goto exit_unlock;
256 }
257 }
258 break;
259
260 case XFLEX_SET_COUNTER_FPD:
261 ret = kstrtou32(buf, 0, &val);
262 if (ret < 0)
263 goto exit_unlock;
264
265 flexpm->counterid_fpd = val;
266 reset_default(dev, val, FPM_FPD);
267 break;
268
269 case XFLEX_GET_COUNTER_FPD_WRRSP:
270 reg = flexpm->counterid_fpd | FPM_WRRSP_L | FPM_VAL;
271 domain = FPM_FPD;
272
273 break;
274
275 case XFLEX_GET_COUNTER_FPD_WRREQ:
276 reg = flexpm->counterid_fpd | FPM_WRREQ_L | FPM_VAL;
277 domain = FPM_FPD;
278
279 break;
280
281 case XFLEX_GET_COUNTER_FPD_RDRSP:
282 reg = flexpm->counterid_fpd | FPM_RDRSP_L | FPM_VAL;
283 domain = FPM_FPD;
284
285 break;
286
287 case XFLEX_GET_COUNTER_FPD_RDREQ:
288 reg = flexpm->counterid_fpd | FPM_RDREQ_L | FPM_VAL;
289 domain = FPM_FPD;
290
291 break;
292
293 default:
294 dev_err(dev, "Invalid option\n");
295 break;
296 }
297
298 ret = zynqmp_pm_probe_counter_read(domain, reg, &pm_api_ret[0]);
299
300 if (ret < 0) {
301 dev_err(dev, "Counter read error %d\n", ret);
302 return ret;
303 }
304 mutex_unlock(&flexpm->mutex);
305 return pm_api_ret[1];
306
307 exit_unlock:
308 mutex_unlock(&flexpm->mutex);
309 return ret;
310 }
311
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 32693 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210812/49f87224/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list