Re: [PATCH] SUNRPC: Drop all entries left in cache_detail when destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kinglong,

[auto build test WARNING on nfsd/nfsd-next]
[also build test WARNING on v4.10-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kinglong-Mee/SUNRPC-Drop-all-entries-left-in-cache_detail-when-destroy/20170205-214442
base:   git://linux-nfs.org/~bfields/linux.git nfsd-next
config: i386-randconfig-x004-201706 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from include/linux/wait.h:6,
                    from include/linux/fs.h:5,
                    from net/sunrpc/cache.c:14:
   net/sunrpc/cache.c: In function 'sunrpc_destroy_cache_detail':
>> include/linux/kern_levels.h:4:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'char *' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
>> net/sunrpc/cache.c:372:10: note: in expansion of macro 'KERN_ERR'
      printk(KERN_ERR "RPC: %d entries left in %s cache\n", cd->name);
             ^~~~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
    #define KERN_ERR KERN_SOH "3" /* error conditions */
                     ^~~~~~~~
>> net/sunrpc/cache.c:372:10: note: in expansion of macro 'KERN_ERR'
      printk(KERN_ERR "RPC: %d entries left in %s cache\n", cd->name);
             ^~~~~~~~

vim +/KERN_ERR +372 net/sunrpc/cache.c

   356		queue_delayed_work(system_power_efficient_wq, &cache_cleaner, 0);
   357	}
   358	EXPORT_SYMBOL_GPL(sunrpc_init_cache_detail);
   359	
   360	void sunrpc_destroy_cache_detail(struct cache_detail *cd)
   361	{
   362		struct cache_head *ch = NULL;
   363		struct hlist_head *head = NULL;
   364		struct hlist_node *tmp = NULL;
   365		int i = 0;
   366	
   367		cache_purge(cd);
   368		spin_lock(&cache_list_lock);
   369		write_lock(&cd->hash_lock);
   370	
   371		if (cd->entries) {
 > 372			printk(KERN_ERR "RPC: %d entries left in %s cache\n", cd->name);
   373			for (i = 0; i < cd->hash_size; i++) {
   374				head = &cd->hash_table[i];
   375				hlist_for_each_entry_safe(ch, tmp, head, cache_list) {
   376					hlist_del_init(&ch->cache_list);
   377					set_bit(CACHE_CLEANED, &ch->flags);
   378					cache_fresh_unlocked(ch, cd);
   379					cache_put(ch, cd);
   380				}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux