All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 6322/6900] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string
@ 2020-07-09 13:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-09 13:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2366 bytes --]

Hi yangerkun,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b966b5cf71790478be7726593d011cb085a97a94
commit: 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd [6322/6900] dm dust: add interface to list all badblocks
config: parisc-randconfig-r036-20200709 (attached as .config)
compiler: hppa-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=parisc 

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: 30419 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-09 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 13:29 [linux-next:master 6322/6900] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string 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.