All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH linux] blk-cgroup: always terminate io.stat lines
Date: Mon, 10 Jan 2022 21:12:20 +0800	[thread overview]
Message-ID: <202201102157.vMQdZCc7-lkp@intel.com> (raw)
In-Reply-To: <20220110103724.11743-1-w.bumiller@proxmox.com>

[-- Attachment #1: Type: text/plain, Size: 5863 bytes --]

Hi Wolfgang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]

url:    https://github.com/0day-ci/linux/commits/Wolfgang-Bumiller/blk-cgroup-always-terminate-io-stat-lines/20220110-183914
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 136057256686de39cc3a07c2e39ef6bc43003ff6
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220110/202201102157.vMQdZCc7-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/c3b02ad1d968fc1f962c4e9438ebcd22140c3403
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Wolfgang-Bumiller/blk-cgroup-always-terminate-io-stat-lines/20220110-183914
        git checkout c3b02ad1d968fc1f962c4e9438ebcd22140c3403
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash

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 >>):

   block/blk-cgroup.c: In function 'blkcg_print_one_stat':
>> block/blk-cgroup.c:891:7: warning: variable 'has_stats' set but not used [-Wunused-but-set-variable]
     891 |  bool has_stats = false;
         |       ^~~~~~~~~


vim +/has_stats +891 block/blk-cgroup.c

ef45fe470e1e54 Boris Burkov      2020-06-01  886  
49cb5168a7c6ab Christoph Hellwig 2021-08-10  887  static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
2ee867dcfa2eae Tejun Heo         2015-08-18  888  {
f73316482977ac Tejun Heo         2019-11-07  889  	struct blkg_iostat_set *bis = &blkg->iostat;
636620b66d5d40 Tejun Heo         2018-07-18  890  	u64 rbytes, wbytes, rios, wios, dbytes, dios;
903d23f0a354f2 Josef Bacik       2018-07-03 @891  	bool has_stats = false;
49cb5168a7c6ab Christoph Hellwig 2021-08-10  892  	const char *dname;
f73316482977ac Tejun Heo         2019-11-07  893  	unsigned seq;
49cb5168a7c6ab Christoph Hellwig 2021-08-10  894  	int i;
b0814361a25cba Tejun Heo         2019-11-05  895  
b0814361a25cba Tejun Heo         2019-11-05  896  	if (!blkg->online)
49cb5168a7c6ab Christoph Hellwig 2021-08-10  897  		return;
b0814361a25cba Tejun Heo         2019-11-05  898  
2ee867dcfa2eae Tejun Heo         2015-08-18  899  	dname = blkg_dev_name(blkg);
2ee867dcfa2eae Tejun Heo         2015-08-18  900  	if (!dname)
49cb5168a7c6ab Christoph Hellwig 2021-08-10  901  		return;
2ee867dcfa2eae Tejun Heo         2015-08-18  902  
252c651a4c854b Christoph Hellwig 2021-08-10  903  	seq_printf(s, "%s ", dname);
903d23f0a354f2 Josef Bacik       2018-07-03  904  
f73316482977ac Tejun Heo         2019-11-07  905  	do {
f73316482977ac Tejun Heo         2019-11-07  906  		seq = u64_stats_fetch_begin(&bis->sync);
2ee867dcfa2eae Tejun Heo         2015-08-18  907  
f73316482977ac Tejun Heo         2019-11-07  908  		rbytes = bis->cur.bytes[BLKG_IOSTAT_READ];
f73316482977ac Tejun Heo         2019-11-07  909  		wbytes = bis->cur.bytes[BLKG_IOSTAT_WRITE];
f73316482977ac Tejun Heo         2019-11-07  910  		dbytes = bis->cur.bytes[BLKG_IOSTAT_DISCARD];
f73316482977ac Tejun Heo         2019-11-07  911  		rios = bis->cur.ios[BLKG_IOSTAT_READ];
f73316482977ac Tejun Heo         2019-11-07  912  		wios = bis->cur.ios[BLKG_IOSTAT_WRITE];
f73316482977ac Tejun Heo         2019-11-07  913  		dios = bis->cur.ios[BLKG_IOSTAT_DISCARD];
f73316482977ac Tejun Heo         2019-11-07  914  	} while (u64_stats_fetch_retry(&bis->sync, seq));
2ee867dcfa2eae Tejun Heo         2015-08-18  915  
903d23f0a354f2 Josef Bacik       2018-07-03  916  	if (rbytes || wbytes || rios || wios) {
903d23f0a354f2 Josef Bacik       2018-07-03  917  		has_stats = true;
252c651a4c854b Christoph Hellwig 2021-08-10  918  		seq_printf(s, "rbytes=%llu wbytes=%llu rios=%llu wios=%llu dbytes=%llu dios=%llu",
636620b66d5d40 Tejun Heo         2018-07-18  919  			rbytes, wbytes, rios, wios,
636620b66d5d40 Tejun Heo         2018-07-18  920  			dbytes, dios);
903d23f0a354f2 Josef Bacik       2018-07-03  921  	}
903d23f0a354f2 Josef Bacik       2018-07-03  922  
07b0fdecb24773 Tejun Heo         2019-07-16  923  	if (blkcg_debug_stats && atomic_read(&blkg->use_delay)) {
d09d8df3a29403 Josef Bacik       2018-07-03  924  		has_stats = true;
252c651a4c854b Christoph Hellwig 2021-08-10  925  		seq_printf(s, " use_delay=%d delay_nsec=%llu",
d09d8df3a29403 Josef Bacik       2018-07-03  926  			atomic_read(&blkg->use_delay),
49cb5168a7c6ab Christoph Hellwig 2021-08-10  927  			atomic64_read(&blkg->delay_nsec));
d09d8df3a29403 Josef Bacik       2018-07-03  928  	}
d09d8df3a29403 Josef Bacik       2018-07-03  929  
903d23f0a354f2 Josef Bacik       2018-07-03  930  	for (i = 0; i < BLKCG_MAX_POLS; i++) {
903d23f0a354f2 Josef Bacik       2018-07-03  931  		struct blkcg_policy *pol = blkcg_policy[i];
903d23f0a354f2 Josef Bacik       2018-07-03  932  
903d23f0a354f2 Josef Bacik       2018-07-03  933  		if (!blkg->pd[i] || !pol->pd_stat_fn)
903d23f0a354f2 Josef Bacik       2018-07-03  934  			continue;
903d23f0a354f2 Josef Bacik       2018-07-03  935  
252c651a4c854b Christoph Hellwig 2021-08-10  936  		if (pol->pd_stat_fn(blkg->pd[i], s))
903d23f0a354f2 Josef Bacik       2018-07-03  937  			has_stats = true;
903d23f0a354f2 Josef Bacik       2018-07-03  938  	}
07b0fdecb24773 Tejun Heo         2019-07-16  939  
c3b02ad1d968fc Wolfgang Bumiller 2022-01-10  940  	seq_puts(s, "\n");
f539da82f21589 Tejun Heo         2019-06-13  941  }
2ee867dcfa2eae Tejun Heo         2015-08-18  942  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

      reply	other threads:[~2022-01-10 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 10:37 [PATCH linux] blk-cgroup: always terminate io.stat lines Wolfgang Bumiller
2022-01-10 10:37 ` Wolfgang Bumiller
2022-01-10 13:12 ` kernel test robot [this message]

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=202201102157.vMQdZCc7-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.