Re: [PATCH] ext2: fix empty body warnings when -Wextra is used

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

 



Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.6-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/ext2-fix-empty-body-warnings-when-Wextra-is-used/20200323-113040
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e
config: h8300-randconfig-a001-20200322 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=h8300 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/linux/buffer_head.h:12,
                    from fs/ext2/xattr.c:57:
   fs/ext2/xattr.c: In function 'ext2_xattr_cache_insert':
>> fs/ext2/xattr.c:869:18: error: 'ext2_xattr_cache' undeclared (first use in this function); did you mean 'ext2_xattr_list'?
     869 |     atomic_read(&ext2_xattr_cache->c_entry_count));
         |                  ^~~~~~~~~~~~~~~~
   include/linux/printk.h:137:17: note: in definition of macro 'no_printk'
     137 |   printk(fmt, ##__VA_ARGS__);  \
         |                 ^~~~~~~~~~~
>> fs/ext2/xattr.c:868:4: note: in expansion of macro 'ea_bdebug'
     868 |    ea_bdebug(bh, "already in cache (%d cache entries)",
         |    ^~~~~~~~~
   include/linux/compiler.h:269:22: note: in expansion of macro '__READ_ONCE'
     269 | #define READ_ONCE(x) __READ_ONCE(x, 1)
         |                      ^~~~~~~~~~~
   arch/h8300/include/asm/atomic.h:17:25: note: in expansion of macro 'READ_ONCE'
      17 | #define atomic_read(v)  READ_ONCE((v)->counter)
         |                         ^~~~~~~~~
>> fs/ext2/xattr.c:869:5: note: in expansion of macro 'atomic_read'
     869 |     atomic_read(&ext2_xattr_cache->c_entry_count));
         |     ^~~~~~~~~~~
   fs/ext2/xattr.c:869:18: note: each undeclared identifier is reported only once for each function it appears in
     869 |     atomic_read(&ext2_xattr_cache->c_entry_count));
         |                  ^~~~~~~~~~~~~~~~
   include/linux/printk.h:137:17: note: in definition of macro 'no_printk'
     137 |   printk(fmt, ##__VA_ARGS__);  \
         |                 ^~~~~~~~~~~
>> fs/ext2/xattr.c:868:4: note: in expansion of macro 'ea_bdebug'
     868 |    ea_bdebug(bh, "already in cache (%d cache entries)",
         |    ^~~~~~~~~
   include/linux/compiler.h:269:22: note: in expansion of macro '__READ_ONCE'
     269 | #define READ_ONCE(x) __READ_ONCE(x, 1)
         |                      ^~~~~~~~~~~
   arch/h8300/include/asm/atomic.h:17:25: note: in expansion of macro 'READ_ONCE'
      17 | #define atomic_read(v)  READ_ONCE((v)->counter)
         |                         ^~~~~~~~~
>> fs/ext2/xattr.c:869:5: note: in expansion of macro 'atomic_read'
     869 |     atomic_read(&ext2_xattr_cache->c_entry_count));
         |     ^~~~~~~~~~~

vim +869 fs/ext2/xattr.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  849  
^1da177e4c3f41 Linus Torvalds 2005-04-16  850  /*
^1da177e4c3f41 Linus Torvalds 2005-04-16  851   * ext2_xattr_cache_insert()
^1da177e4c3f41 Linus Torvalds 2005-04-16  852   *
^1da177e4c3f41 Linus Torvalds 2005-04-16  853   * Create a new entry in the extended attribute cache, and insert
^1da177e4c3f41 Linus Torvalds 2005-04-16  854   * it unless such an entry is already in the cache.
^1da177e4c3f41 Linus Torvalds 2005-04-16  855   *
^1da177e4c3f41 Linus Torvalds 2005-04-16  856   * Returns 0, or a negative error number on failure.
^1da177e4c3f41 Linus Torvalds 2005-04-16  857   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  858  static int
7a2508e1b657cf Jan Kara       2016-02-22  859  ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
^1da177e4c3f41 Linus Torvalds 2005-04-16  860  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  861  	__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
^1da177e4c3f41 Linus Torvalds 2005-04-16  862  	int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16  863  
3e159b9553e402 Chengguang Xu  2018-11-15  864  	error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr,
3e159b9553e402 Chengguang Xu  2018-11-15  865  				      true);
^1da177e4c3f41 Linus Torvalds 2005-04-16  866  	if (error) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  867  		if (error == -EBUSY) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 @868  			ea_bdebug(bh, "already in cache (%d cache entries)",
^1da177e4c3f41 Linus Torvalds 2005-04-16 @869  				atomic_read(&ext2_xattr_cache->c_entry_count));
^1da177e4c3f41 Linus Torvalds 2005-04-16  870  			error = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  871  		}
be0726d33cb8f4 Jan Kara       2016-02-22  872  	} else
be0726d33cb8f4 Jan Kara       2016-02-22  873  		ea_bdebug(bh, "inserting [%x]", (int)hash);
^1da177e4c3f41 Linus Torvalds 2005-04-16  874  	return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16  875  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  876  

:::::: The code at line 869 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux