From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jimc:dd-drm-next 3/16] lib/dynamic_debug.c:786:54: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int')
Date: Sun, 12 Sep 2021 07:16:36 +0800 [thread overview]
Message-ID: <202109120730.atJbfbRf-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]
tree: https://github.com/jimc/linux.git dd-drm-next
head: 02a6c357b6a5eb02cc6b2ceb5a7a93c809388ae0
commit: 74992de06222ed51caed07800e291e68eb4a627e [3/16] dyndbg: rationalize verbosity
config: hexagon-randconfig-r034-20210911 (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
# https://github.com/jimc/linux/commit/74992de06222ed51caed07800e291e68eb4a627e
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 74992de06222ed51caed07800e291e68eb4a627e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon
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 >>):
>> lib/dynamic_debug.c:786:54: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
v2pr_info("read %lu bytes from userspace <\n%s>\n", len, tmpbuf);
~~~ ^~~
%u
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__)
~~~ ^~~~~~~~~~~
1 warning 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 %lu 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: 25551 bytes --]
reply other threads:[~2021-09-11 23:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109120730.atJbfbRf-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.