* [shenki:aspeed-otp 140/140] drivers/soc/aspeed/aspeed-otp.c:394:22: warning: passing argument 1 of 'writel' makes integer from pointer without a cast
@ 2021-03-30 8:09 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-30 8:09 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5735 bytes --]
tree: https://github.com/shenki/linux aspeed-otp
head: 1901faa3a9a68dd9e8e3e81207602d9ff315f2c1
commit: 1901faa3a9a68dd9e8e3e81207602d9ff315f2c1 [140/140] soc: aspeed: Add driver for OTP region
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.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/shenki/linux/commit/1901faa3a9a68dd9e8e3e81207602d9ff315f2c1
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki aspeed-otp
git checkout 1901faa3a9a68dd9e8e3e81207602d9ff315f2c1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/soc/aspeed/aspeed-otp.c:213:5: warning: no previous prototype for 'otp_read_conf' [-Wmissing-prototypes]
213 | int otp_read_conf(struct aspeed_otp *otp)
| ^~~~~~~~~~~~~
drivers/soc/aspeed/aspeed-otp.c:236:5: warning: no previous prototype for 'otp_read_strap' [-Wmissing-prototypes]
236 | int otp_read_strap(struct aspeed_otp *otp)
| ^~~~~~~~~~~~~~
drivers/soc/aspeed/aspeed-otp.c:291:5: warning: no previous prototype for 'otp_write_conf' [-Wmissing-prototypes]
291 | int otp_write_conf(struct aspeed_otp *otp, unsigned int word, unsigned int bit)
| ^~~~~~~~~~~~~~
drivers/soc/aspeed/aspeed-otp.c:327:5: warning: no previous prototype for 'otp_write_strap' [-Wmissing-prototypes]
327 | int otp_write_strap(struct aspeed_otp *otp, unsigned int bit, unsigned int val)
| ^~~~~~~~~~~~~~~
drivers/soc/aspeed/aspeed-otp.c: In function 'otp_write_strap':
>> drivers/soc/aspeed/aspeed-otp.c:394:22: warning: passing argument 1 of 'writel' makes integer from pointer without a cast [-Wint-conversion]
394 | writel(otp->base + OTP_PROTECT_KEY, 0);
| ^
| |
| void *
In file included from arch/ia64/include/asm/io.h:282,
from arch/ia64/include/asm/uaccess.h:41,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from drivers/soc/aspeed/aspeed-otp.c:6:
include/asm-generic/io.h:222:31: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'void *'
222 | static inline void writel(u32 value, volatile void __iomem *addr)
| ~~~~^~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +/writel +394 drivers/soc/aspeed/aspeed-otp.c
326
327 int otp_write_strap(struct aspeed_otp *otp, unsigned int bit, unsigned int val)
328 {
329 int i;
330 int rc;
331 int f = -1;
332 uint32_t address;
333 uint32_t bitmask;
334 uint32_t protect;
335 uint32_t res = 0;
336 uint32_t word = 0;
337 uint32_t strap[6];
338
339 if (bit >= 64 || val > 1)
340 return -EINVAL;
341
342 writel(OTP_PASSWD, otp->base + OTP_PROTECT_KEY);
343
344 if (bit > 31) {
345 word = 1;
346 bit -= 32;
347 }
348
349 bitmask = 1 << bit;
350
351 rc = otp_read_config(otp, 30 + word, &protect);
352 if (rc)
353 goto done;
354
355 if (protect & bitmask) {
356 dev_err(otp->dev, "Cannot write strap; bit is protected\n");
357 rc = -EACCES;
358 goto done;
359 }
360
361 for (i = 0; i < 6; ++i) {
362 uint32_t o = 16 + (i * 2);
363
364 rc = otp_read_config(otp, o + word, &strap[i]);
365 if (rc)
366 goto done;
367
368 res ^= strap[i];
369 if (f < 0 && !(strap[i] & bitmask))
370 f = i;
371 }
372
373 if (f < 0) {
374 dev_err(otp->dev, "Strap cannot be configured further\n");
375 rc = -EPERM;
376 goto done;
377 }
378
379 if (((res & bitmask) && val) || (!val && !(res & bitmask))) {
380 dev_err(otp->dev, "Strap already in desired configuration\n");
381 rc = -EALREADY;
382 goto done;
383 }
384
385 i = (16 + (f * 2)) + word;
386 address = 0x800;
387 address |= (i / 8) * 0x200;
388 address |= (i % 8) * 2;
389
390 dev_dbg(otp->dev, "Writing strap at OTP %04x with %08x\n", address, bitmask);
391 rc = otp_write(otp, address, bitmask);
392
393 done:
> 394 writel(otp->base + OTP_PROTECT_KEY, 0);
395 return rc;
396 }
397
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 62768 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-30 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 8:09 [shenki:aspeed-otp 140/140] drivers/soc/aspeed/aspeed-otp.c:394:22: warning: passing argument 1 of 'writel' makes integer from pointer without a cast kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.