mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com
Subject: Re: [rcu:dev.2020.06.02a 67/90] kernel/rcu/rcuperf.c:727:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long'
Date: Fri, 5 Jun 2020 17:19:14 -0700	[thread overview]
Message-ID: <20200606001914.GE4455@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <202006060704.dM7SxfSK%lkp@intel.com>

On Sat, Jun 06, 2020 at 07:07:10AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.06.02a
> head:   5216948905dd07a84cef8a7dc72c2ec076802efd
> commit: 7d16add62717136b1839f0b3d7ea4cbb98f38c2a [67/90] rcuperf: Fix kfree_mult to match printk() format
> config: arm-randconfig-r004-20200605 (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 6dd738e2f0609f7d3313b574a1d471263d2d3ba1)
> 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 arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         git checkout 7d16add62717136b1839f0b3d7ea4cbb98f38c2a
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

Adding Kefeng on CC.  Kefeng, thoughts?

							Thanx, Paul

> All warnings (new ones prefixed by >>, old ones prefixed by <<):
> 
> >> kernel/rcu/rcuperf.c:727:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
> pr_alert("kfree object size=%zun", kfree_mult * sizeof(struct kfree_obj));
> ~~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> %lu
> include/linux/printk.h:295:35: note: expanded from macro 'pr_alert'
> printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
> ~~~     ^~~~~~~~~~~
> 1 warning generated.
> 
> vim +727 kernel/rcu/rcuperf.c
> 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  709) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  710) static int __init
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  711) kfree_perf_init(void)
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  712) {
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  713) 	long i;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  714) 	int firsterr = 0;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  715) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  716) 	kfree_nrealthreads = compute_real(kfree_nthreads);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  717) 	/* Start up the kthreads. */
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  718) 	if (shutdown) {
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  719) 		init_waitqueue_head(&shutdown_wq);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  720) 		firsterr = torture_create_kthread(kfree_perf_shutdown, NULL,
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  721) 						  shutdown_task);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  722) 		if (firsterr)
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  723) 			goto unwind;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  724) 		schedule_timeout_uninterruptible(1);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  725) 	}
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  726) 
> b3e2d20973db3e Kefeng Wang             2020-04-17 @727  	pr_alert("kfree object size=%zu\n", kfree_mult * sizeof(struct kfree_obj));
> f87dc808009ac8 Joel Fernandes (Google  2020-03-16  728) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  729) 	kfree_reader_tasks = kcalloc(kfree_nrealthreads, sizeof(kfree_reader_tasks[0]),
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  730) 			       GFP_KERNEL);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  731) 	if (kfree_reader_tasks == NULL) {
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  732) 		firsterr = -ENOMEM;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  733) 		goto unwind;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  734) 	}
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  735) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  736) 	for (i = 0; i < kfree_nrealthreads; i++) {
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  737) 		firsterr = torture_create_kthread(kfree_perf_thread, (void *)i,
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  738) 						  kfree_reader_tasks[i]);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  739) 		if (firsterr)
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  740) 			goto unwind;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  741) 	}
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  742) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  743) 	while (atomic_read(&n_kfree_perf_thread_started) < kfree_nrealthreads)
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  744) 		schedule_timeout_uninterruptible(1);
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  745) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  746) 	torture_init_end();
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  747) 	return 0;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  748) 
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  749) unwind:
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  750) 	torture_init_end();
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  751) 	kfree_perf_cleanup();
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  752) 	return firsterr;
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  753) }
> e6e78b004fa7e0 Joel Fernandes (Google  2019-08-30  754) 
> 
> :::::: The code at line 727 was first introduced by commit
> :::::: b3e2d20973db3ec87a6dd2fee0c88d3c2e7c2f61 rcuperf: Fix printk format warning
> 
> :::::: TO: Kefeng Wang <wangkefeng.wang@huawei.com>
> :::::: CC: Paul E. McKenney <paulmck@kernel.org>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



  reply	other threads:[~2020-06-06  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 23:07 kernel test robot
2020-06-06  0:19 ` Paul E. McKenney [this message]
2020-06-07 19:00   ` Paul E. McKenney
     [not found]     ` <f6df7c3e-4c43-47eb-4c4f-a5e9de0d332f@huawei.com>
2020-06-08  3:26       ` Nathan Chancellor
2020-06-08 16:06         ` Paul E. McKenney

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=20200606001914.GE4455@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®