From: kernel test robot <lkp@intel.com>
To: Mike Christie <michael.christie@oracle.com>,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH 1/2] target: Move IO path stats to per cpu
Date: Tue, 15 Apr 2025 15:17:39 +0800 [thread overview]
Message-ID: <202504151524.Ar21ia6A-lkp@intel.com> (raw)
In-Reply-To: <20250413040500.20954-2-michael.christie@oracle.com>
Hi Mike,
kernel test robot noticed the following build warnings:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on linus/master v6.15-rc2 next-20250414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Mike-Christie/target-Move-IO-path-stats-to-per-cpu/20250414-113809
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link: https://lore.kernel.org/r/20250413040500.20954-2-michael.christie%40oracle.com
patch subject: [PATCH 1/2] target: Move IO path stats to per cpu
config: i386-buildonly-randconfig-003-20250415 (https://download.01.org/0day-ci/archive/20250415/202504151524.Ar21ia6A-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250415/202504151524.Ar21ia6A-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504151524.Ar21ia6A-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/target/target_core_stat.c:289:3: warning: variable 'cmds' is uninitialized when used here [-Wuninitialized]
289 | cmds += stats->total_cmds;
| ^~~~
drivers/target/target_core_stat.c:285:10: note: initialize the variable 'cmds' to silence this warning
285 | u32 cmds;
| ^
| = 0
>> drivers/target/target_core_stat.c:306:3: warning: variable 'bytes' is uninitialized when used here [-Wuninitialized]
306 | bytes += stats->read_bytes;
| ^~~~~
drivers/target/target_core_stat.c:302:11: note: initialize the variable 'bytes' to silence this warning
302 | u32 bytes;
| ^
| = 0
drivers/target/target_core_stat.c:323:3: warning: variable 'bytes' is uninitialized when used here [-Wuninitialized]
323 | bytes += stats->write_bytes;
| ^~~~~
drivers/target/target_core_stat.c:319:11: note: initialize the variable 'bytes' to silence this warning
319 | u32 bytes;
| ^
| = 0
drivers/target/target_core_stat.c:1058:3: warning: variable 'cmds' is uninitialized when used here [-Wuninitialized]
1058 | cmds += stats->total_cmds;
| ^~~~
drivers/target/target_core_stat.c:1047:10: note: initialize the variable 'cmds' to silence this warning
1047 | u32 cmds;
| ^
| = 0
drivers/target/target_core_stat.c:1087:3: warning: variable 'bytes' is uninitialized when used here [-Wuninitialized]
1087 | bytes += stats->read_bytes;
| ^~~~~
drivers/target/target_core_stat.c:1076:11: note: initialize the variable 'bytes' to silence this warning
1076 | u32 bytes;
| ^
| = 0
drivers/target/target_core_stat.c:1116:3: warning: variable 'bytes' is uninitialized when used here [-Wuninitialized]
1116 | bytes += stats->write_bytes;
| ^~~~~
drivers/target/target_core_stat.c:1105:11: note: initialize the variable 'bytes' to silence this warning
1105 | u32 bytes;
| ^
| = 0
6 warnings generated.
vim +/cmds +289 drivers/target/target_core_stat.c
278
279 static ssize_t target_stat_lu_num_cmds_show(struct config_item *item,
280 char *page)
281 {
282 struct se_device *dev = to_stat_lu_dev(item);
283 struct se_dev_io_stats *stats;
284 unsigned int cpu;
285 u32 cmds;
286
287 for_each_possible_cpu(cpu) {
288 stats = per_cpu_ptr(dev->stats, cpu);
> 289 cmds += stats->total_cmds;
290 }
291
292 /* scsiLuNumCommands */
293 return snprintf(page, PAGE_SIZE, "%u\n", cmds);
294 }
295
296 static ssize_t target_stat_lu_read_mbytes_show(struct config_item *item,
297 char *page)
298 {
299 struct se_device *dev = to_stat_lu_dev(item);
300 struct se_dev_io_stats *stats;
301 unsigned int cpu;
302 u32 bytes;
303
304 for_each_possible_cpu(cpu) {
305 stats = per_cpu_ptr(dev->stats, cpu);
> 306 bytes += stats->read_bytes;
307 }
308
309 /* scsiLuReadMegaBytes */
310 return snprintf(page, PAGE_SIZE, "%u\n", bytes >> 20);
311 }
312
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-04-15 7:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-13 3:59 [PATCH 0/2] target: Remove atomics from main IO path Mike Christie
2025-04-13 3:59 ` [PATCH 1/2] target: Move IO path stats to per cpu Mike Christie
2025-04-15 7:17 ` kernel test robot [this message]
2025-04-13 3:59 ` [PATCH 2/2] target: Move delayed/ordered tracking " Mike Christie
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=202504151524.Ar21ia6A-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=target-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox