[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202211090102.WDZ33mg0-lkp@intel.com>
Date: Wed, 9 Nov 2022 02:07:45 +0800
From: kernel test robot <lkp@...el.com>
To: Zhang Yi <yi.zhang@...wei.com>, linux-ext4@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, tytso@....edu,
adilger.kernel@...ger.ca, jack@...e.cz, yi.zhang@...wei.com,
yukuai3@...wei.com
Subject: Re: [PATCH 02/12] ext4: introduce fault injection facility
Hi Zhang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tytso-ext4/dev]
[also build test WARNING on linus/master v6.1-rc4 next-20221108]
[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/Zhang-Yi/ext4-enhance-simulate-fail-facility/20221108-223039
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link: https://lore.kernel.org/r/20221108144617.4159381-3-yi.zhang%40huawei.com
patch subject: [PATCH 02/12] ext4: introduce fault injection facility
config: powerpc-allmodconfig
compiler: powerpc-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/26d4ab5a40cf0f3385e8f80314c3f3b6426a8d6c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Zhang-Yi/ext4-enhance-simulate-fail-facility/20221108-223039
git checkout 26d4ab5a40cf0f3385e8f80314c3f3b6426a8d6c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash fs/ext4/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from fs/ext4/sysfs.c:19:
fs/ext4/sysfs.c: In function 'ext4_fault_ops_write':
>> fs/ext4/sysfs.c:630:40: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
630 | ext4_msg(sb, KERN_ERR, "fault operation too long %lu", count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
| |
| size_t {aka unsigned int}
fs/ext4/ext4.h:3255:31: note: in definition of macro 'ext4_msg'
3255 | __ext4_msg(sb, level, fmt, ##__VA_ARGS__)
| ^~~
fs/ext4/sysfs.c:630:68: note: format string is defined here
630 | ext4_msg(sb, KERN_ERR, "fault operation too long %lu", count);
| ~~^
| |
| long unsigned int
| %u
vim +630 fs/ext4/sysfs.c
618
619 static ssize_t ext4_fault_ops_write(struct file *file, const char __user *buffer,
620 size_t count, loff_t *ppos)
621 {
622 struct seq_file *m = file->private_data;
623 struct super_block *sb = m->private;
624 struct ext4_fault_attr *attr = &EXT4_SB(sb)->s_fault_attr;
625 char fault_buf[32] = { };
626 char *fault_op;
627 int i;
628
629 if (count >= sizeof(fault_buf)) {
> 630 ext4_msg(sb, KERN_ERR, "fault operation too long %lu", count);
631 return -EINVAL;
632 }
633 if (copy_from_user(fault_buf, buffer, count))
634 return -EFAULT;
635
636 fault_op = strstrip(fault_buf);
637 for (i = 0; i < ARRAY_SIZE(ext4_fault_names); i++) {
638 if (!strcmp(fault_op, ext4_fault_names[i])) {
639 __set_bit(i, attr->fail_ops);
640 break;
641 }
642 }
643 *ppos += count;
644 return count;
645 }
646
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (320339 bytes)
Powered by blists - more mailing lists