From: kernel test robot <lkp@intel.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Cc: kbuild-all@lists.01.org, David Sterba <dsterba@suse.com>
Subject: Re: [PATCH] btrfs: sysfs: export dev stats in devinfo directory
Date: Fri, 4 Jun 2021 23:13:41 +0800 [thread overview]
Message-ID: <202106042327.eGBzmy7a-lkp@intel.com> (raw)
In-Reply-To: <20210604132058.11334-1-dsterba@suse.com>
[-- Attachment #1: Type: text/plain, Size: 3440 bytes --]
Hi David,
I love your patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on next-20210604]
[cannot apply to v5.13-rc4]
[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]
url: https://github.com/0day-ci/linux/commits/David-Sterba/btrfs-sysfs-export-dev-stats-in-devinfo-directory/20210604-212445
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: riscv-randconfig-s032-20210604 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/8a58ea51305ace4835c7abc51e46b7b64e25b793
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Sterba/btrfs-sysfs-export-dev-stats-in-devinfo-directory/20210604-212445
git checkout 8a58ea51305ace4835c7abc51e46b7b64e25b793
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=riscv
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 >>):
fs/btrfs/sysfs.c: In function 'btrfs_devinfo_stats_show':
>> fs/btrfs/sysfs.c:1510:17: warning: format '%d' expects argument of type 'int', but argument 4 has type 'char *' [-Wformat=]
1510 | "stats_valid %d\n",
| ~^
| |
| int
| %s
1511 | "write_errs %d\n"
| ~~~~~~~~~~~~~~~~~
| |
| char *
>> fs/btrfs/sysfs.c:1510:3: warning: too many arguments for format [-Wformat-extra-args]
1510 | "stats_valid %d\n",
| ^~~~~~~~~~~~~~~~~~
vim +1510 fs/btrfs/sysfs.c
1497
1498 static ssize_t btrfs_devinfo_stats_show(struct kobject *kobj,
1499 struct kobj_attribute *a, char *buf)
1500 {
1501 struct btrfs_device *device = container_of(kobj, struct btrfs_device,
1502 devid_kobj);
1503
1504 /*
1505 * Print all at once so we get a snapshot of all values from the same
1506 * time. Keep them in sync and in order of definition of
1507 * btrfs_dev_stat_values.
1508 */
1509 return scnprintf(buf, PAGE_SIZE,
> 1510 "stats_valid %d\n",
1511 "write_errs %d\n"
1512 "read_errs %d\n"
1513 "flush_errs %d\n"
1514 "corruption_errs %d\n"
1515 "generation_errs %d\n",
1516 !!(device->dev_stats_valid),
1517 btrfs_dev_stat_read(device, BTRFS_DEV_STAT_WRITE_ERRS),
1518 btrfs_dev_stat_read(device, BTRFS_DEV_STAT_READ_ERRS),
1519 btrfs_dev_stat_read(device, BTRFS_DEV_STAT_FLUSH_ERRS),
1520 btrfs_dev_stat_read(device, BTRFS_DEV_STAT_CORRUPTION_ERRS),
1521 btrfs_dev_stat_read(device, BTRFS_DEV_STAT_GENERATION_ERRS));
1522 }
1523 BTRFS_ATTR(devid, stats, btrfs_devinfo_stats_show);
1524
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38658 bytes --]
next prev parent reply other threads:[~2021-06-04 15:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 13:20 [PATCH] btrfs: sysfs: export dev stats in devinfo directory David Sterba
2021-06-04 13:23 ` David Sterba
2021-06-04 13:41 ` Anand Jain
2021-06-04 14:21 ` David Sterba
2021-06-04 22:38 ` Anand Jain
2021-06-07 18:55 ` David Sterba
2021-06-09 7:43 ` Anand Jain
2021-06-09 15:14 ` David Sterba
2021-06-04 15:13 ` kernel test robot [this message]
2021-06-04 16:27 ` kernel test robot
2021-06-09 18:24 ` Omar Sandoval
2021-06-09 18:40 ` Omar Sandoval
2021-06-09 18:50 ` David Sterba
2021-06-10 0:55 ` Omar Sandoval
2021-06-10 16:37 ` David Sterba
2021-06-10 17:54 ` Omar Sandoval
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=202106042327.eGBzmy7a-lkp@intel.com \
--to=lkp@intel.com \
--cc=dsterba@suse.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).