Re: [PATCH v4 4/5] blktrace: use rbuf->stats.full as a drop indicator in relayfs
From: Jason Xing <hidden>
Date: 2025-06-11 12:20:47
Also in:
linux-block, lkml, oe-kbuild-all
On Wed, Jun 11, 2025 at 4:08 PM Masami Hiramatsu [off-list ref] wrote:
On Wed, 11 Jun 2025 13:15:40 +0800 Jason Xing [off-list ref] wrote:quoted
On Wed, Jun 11, 2025 at 9:42 AM kernel test robot [off-list ref] wrote:quoted
Hi Jason, kernel test robot noticed the following build warnings: [auto build test WARNING on axboe-block/for-next] [also build test WARNING on drm-i915/for-linux-next drm-i915/for-linux-next-fixes akpm-mm/mm-everything linus/master v6.16-rc1 next-20250610] [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/Jason-Xing/relayfs-abolish-prev_padding/20250610-085150 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20250610004844.66688-5-kerneljasonxing%40gmail.com patch subject: [PATCH v4 4/5] blktrace: use rbuf->stats.full as a drop indicator in relayfs config: arc-randconfig-001-20250610 compiler: arc-linux-gcc (GCC) 12.4.0 reproduce (this is a W=1 build): 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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202506102340.uo7QDaVk-lkp@intel.com/ (local) All warnings (new ones prefixed by >>): kernel/trace/blktrace.c: In function 'blk_dropped_read':quoted
quoted
kernel/trace/blktrace.c:421:39: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]421 | snprintf(buf, sizeof(buf), "%lu\n", dropped); | ~~^ ~~~~~~~ | | | | | size_t {aka unsigned int} | long unsigned int | %uWell, I suppose I will fix it in the re-spin after receiving more comments so that I don't need to quickly respond to this minor issue.Please update the patch and send series with my reviewed-by on 1/5.
Sure, thanks for the review.
BTW, size_t should use %zu. Please check Documentation/core-api/printk-formats.rst
Thanks for the pointer :) Thanks, Jason
Thank you,quoted
Thanks, Jasonquoted
vim +421 kernel/trace/blktrace.c 413 414 static ssize_t blk_dropped_read(struct file *filp, char __user *buffer, 415 size_t count, loff_t *ppos) 416 { 417 struct blk_trace *bt = filp->private_data; 418 size_t dropped = relay_stats(bt->rchan, RELAY_STATS_BUF_FULL); 419 char buf[16]; 420 > 421 snprintf(buf, sizeof(buf), "%lu\n", dropped); 422 423 return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); 424 } 425 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki-- Masami Hiramatsu (Google) [off-list ref]