From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3926780051020116551==" MIME-Version: 1.0 From: kernel test robot 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 Message-ID: <202201102157.vMQdZCc7-lkp@intel.com> In-Reply-To: <20220110103724.11743-1-w.bumiller@proxmox.com> List-Id: --===============3926780051020116551== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-cgro= up-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=3D1 build): # https://github.com/0day-ci/linux/commit/c3b02ad1d968fc1f962c4e943= 8ebcd22140c3403 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Wolfgang-Bumiller/blk-cgroup-alway= s-terminate-io-stat-lines/20220110-183914 git checkout c3b02ad1d968fc1f962c4e9438ebcd22140c3403 # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Dum SUBARCH=3Di386 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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 =3D 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_o= ne_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 =3D &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 =3D 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 =3D 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 ", dna= me); 903d23f0a354f2 Josef Bacik 2018-07-03 904 = f73316482977ac Tejun Heo 2019-11-07 905 do { f73316482977ac Tejun Heo 2019-11-07 906 seq =3D u64_stats_fetch= _begin(&bis->sync); 2ee867dcfa2eae Tejun Heo 2015-08-18 907 = f73316482977ac Tejun Heo 2019-11-07 908 rbytes =3D bis->cur.byt= es[BLKG_IOSTAT_READ]; f73316482977ac Tejun Heo 2019-11-07 909 wbytes =3D bis->cur.byt= es[BLKG_IOSTAT_WRITE]; f73316482977ac Tejun Heo 2019-11-07 910 dbytes =3D bis->cur.byt= es[BLKG_IOSTAT_DISCARD]; f73316482977ac Tejun Heo 2019-11-07 911 rios =3D bis->cur.ios[B= LKG_IOSTAT_READ]; f73316482977ac Tejun Heo 2019-11-07 912 wios =3D bis->cur.ios[B= LKG_IOSTAT_WRITE]; f73316482977ac Tejun Heo 2019-11-07 913 dios =3D bis->cur.ios[B= LKG_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 =3D true; 252c651a4c854b Christoph Hellwig 2021-08-10 918 seq_printf(s, "rbytes= =3D%llu wbytes=3D%llu rios=3D%llu wios=3D%llu dbytes=3D%llu dios=3D%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 =3D true; 252c651a4c854b Christoph Hellwig 2021-08-10 925 seq_printf(s, " use_del= ay=3D%d delay_nsec=3D%llu", d09d8df3a29403 Josef Bacik 2018-07-03 926 atomic_read(&blkg->use= _delay), 49cb5168a7c6ab Christoph Hellwig 2021-08-10 927 atomic64_read(&blkg->d= elay_nsec)); d09d8df3a29403 Josef Bacik 2018-07-03 928 } d09d8df3a29403 Josef Bacik 2018-07-03 929 = 903d23f0a354f2 Josef Bacik 2018-07-03 930 for (i =3D 0; i < BLKCG_= MAX_POLS; i++) { 903d23f0a354f2 Josef Bacik 2018-07-03 931 struct blkcg_policy *po= l =3D blkcg_policy[i]; 903d23f0a354f2 Josef Bacik 2018-07-03 932 = 903d23f0a354f2 Josef Bacik 2018-07-03 933 if (!blkg->pd[i] || !po= l->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(blk= g->pd[i], s)) 903d23f0a354f2 Josef Bacik 2018-07-03 937 has_stats =3D 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 --===============3926780051020116551==--