All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string
@ 2020-07-08 23:58 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-08 23:58 UTC (permalink / raw)
  To: yangerkun; +Cc: dm-devel, kbuild-all, Mike Snitzer, Bryan Gurney

[-- 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 --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string
@ 2020-07-08 23:58 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-08 23:58 UTC (permalink / raw)
  To: kbuild-all

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-08 23:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-07-08 23:58 ` kernel test robot

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.