* [jimc:dd-drm-next 3/16] lib/dynamic_debug.c:786:53: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long')
@ 2021-09-14 11:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-14 11:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6840 bytes --]
tree: https://github.com/jimc/linux.git dd-drm-next
head: bf8f0832d11f09c546179ca6a2c5432706ea3d32
commit: 221a341c10ebb8545beac6ee3937859d26ddcc60 [3/16] dyndbg: rationalize verbosity
config: riscv-buildonly-randconfig-r005-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/jimc/linux/commit/221a341c10ebb8545beac6ee3937859d26ddcc60
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 221a341c10ebb8545beac6ee3937859d26ddcc60
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> lib/dynamic_debug.c:786:53: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
v2pr_info("read %u bytes from userspace <\n%s>\n", len, tmpbuf);
~~ ^~~
%lu
lib/dynamic_debug.c:120:49: note: expanded from macro 'v2pr_info'
#define v2pr_info(fmt, ...) vnpr_info(2, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
lib/dynamic_debug.c:116:18: note: expanded from macro 'vnpr_info'
pr_info(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:420:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
8 warnings generated.
vim +786 lib/dynamic_debug.c
765
766 /*
767 * File_ops->write method for <debugfs>/dynamic_debug/control. Gathers the
768 * command text from userspace, parses and executes it.
769 */
770 #define USER_BUF_PAGE 4096
771 static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
772 size_t len, loff_t *offp)
773 {
774 char *tmpbuf;
775 int ret;
776
777 if (len == 0)
778 return 0;
779 if (len > USER_BUF_PAGE - 1) {
780 pr_warn("expected <%d bytes into control\n", USER_BUF_PAGE);
781 return -E2BIG;
782 }
783 tmpbuf = memdup_user_nul(ubuf, len);
784 if (IS_ERR(tmpbuf))
785 return PTR_ERR(tmpbuf);
> 786 v2pr_info("read %u bytes from userspace <\n%s>\n", len, tmpbuf);
787
788 ret = ddebug_exec_queries(tmpbuf, NULL);
789 kfree(tmpbuf);
790 if (ret < 0)
791 return ret;
792
793 *offp += len;
794 return len;
795 }
796
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31577 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-14 11:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 11:34 [jimc:dd-drm-next 3/16] lib/dynamic_debug.c:786:53: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') 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.