From: kernel test robot <lkp@intel.com>
To: yangerkun <yangerkun@huawei.com>
Cc: dm-devel@redhat.com, kbuild-all@lists.01.org,
Mike Snitzer <snitzer@redhat.com>,
Bryan Gurney <bgurney@redhat.com>
Subject: [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string
Date: Thu, 9 Jul 2020 07:58:11 +0800 [thread overview]
Message-ID: <202007090708.GDf37ros%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2242 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head: d88c192d8c466e0d004f451091c409aa87c5ca89
commit: 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd [16/21] dm dust: add interface to list all badblocks
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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
git checkout 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):
In file included from drivers/md/dm-dust.c:11:
drivers/md/dm-dust.c: In function 'dust_list_badblocks':
>> drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string [-Wformat-zero-length]
307 | DMEMIT("");
| ^~
include/linux/device-mapper.h:566:46: note: in definition of macro 'DMEMIT'
566 | 0 : scnprintf(result + sz, maxlen - sz, x))
| ^
vim +307 drivers/md/dm-dust.c
286
287 static int dust_list_badblocks(struct dust_device *dd, char *result, unsigned int maxlen,
288 unsigned int *sz_ptr)
289 {
290 unsigned long flags;
291 struct rb_root badblocklist;
292 struct rb_node *node;
293 struct badblock *bblk;
294 unsigned int sz = *sz_ptr;
295 unsigned long long num = 0;
296
297 spin_lock_irqsave(&dd->dust_lock, flags);
298 badblocklist = dd->badblocklist;
299 for (node = rb_first(&badblocklist); node; node = rb_next(node)) {
300 bblk = rb_entry(node, struct badblock, node);
301 DMEMIT("%llu\n", bblk->bb);
302 num++;
303 }
304
305 spin_unlock_irqrestore(&dd->dust_lock, flags);
306 if (!num)
> 307 DMEMIT("");
308
309 return 1;
310 }
311
---
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: 65102 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string
Date: Thu, 09 Jul 2020 07:58:11 +0800 [thread overview]
Message-ID: <202007090708.GDf37ros%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head: d88c192d8c466e0d004f451091c409aa87c5ca89
commit: 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd [16/21] dm dust: add interface to list all badblocks
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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
git checkout 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):
In file included from drivers/md/dm-dust.c:11:
drivers/md/dm-dust.c: In function 'dust_list_badblocks':
>> drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string [-Wformat-zero-length]
307 | DMEMIT("");
| ^~
include/linux/device-mapper.h:566:46: note: in definition of macro 'DMEMIT'
566 | 0 : scnprintf(result + sz, maxlen - sz, x))
| ^
vim +307 drivers/md/dm-dust.c
286
287 static int dust_list_badblocks(struct dust_device *dd, char *result, unsigned int maxlen,
288 unsigned int *sz_ptr)
289 {
290 unsigned long flags;
291 struct rb_root badblocklist;
292 struct rb_node *node;
293 struct badblock *bblk;
294 unsigned int sz = *sz_ptr;
295 unsigned long long num = 0;
296
297 spin_lock_irqsave(&dd->dust_lock, flags);
298 badblocklist = dd->badblocklist;
299 for (node = rb_first(&badblocklist); node; node = rb_next(node)) {
300 bblk = rb_entry(node, struct badblock, node);
301 DMEMIT("%llu\n", bblk->bb);
302 num++;
303 }
304
305 spin_unlock_irqrestore(&dd->dust_lock, flags);
306 if (!num)
> 307 DMEMIT("");
308
309 return 1;
310 }
311
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65102 bytes --]
next reply other threads:[~2020-07-08 23:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 23:58 kernel test robot [this message]
2020-07-08 23:58 ` [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string kernel test robot
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=202007090708.GDf37ros%lkp@intel.com \
--to=lkp@intel.com \
--cc=bgurney@redhat.com \
--cc=dm-devel@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=snitzer@redhat.com \
--cc=yangerkun@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.