[mmotm:master 37/234] fs//ocfs2/aops.c:2437:3: note: in expansion of macro 'if'

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

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   a4f20e3ed193cd4b2f742ce37f88112c7441146f
commit: cbc718f7f0e7315ca1dd8049be0f879bdb363bb1 [37/234] ocfs2-fall-back-to-buffer-io-when-append-dio-is-disabled-with-file-hole-existing-fix
config: x86_64-randconfig-s4-12241139 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout cbc718f7f0e7315ca1dd8049be0f879bdb363bb1
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
                    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 fs//ocfs2/aops.c:22:
   fs//ocfs2/aops.c: In function 'ocfs2_range_has_holes':
   fs//ocfs2/aops.c:2437:11: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]
      if (ret < 0) {
              ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> fs//ocfs2/aops.c:2437:3: note: in expansion of macro 'if'
      if (ret < 0) {
      ^~
   fs//ocfs2/aops.c:2437:11: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]
      if (ret < 0) {
              ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> fs//ocfs2/aops.c:2437:3: note: in expansion of macro 'if'
      if (ret < 0) {
      ^~
   fs//ocfs2/aops.c:2437:11: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]
      if (ret < 0) {
              ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> fs//ocfs2/aops.c:2437:3: note: in expansion of macro 'if'
      if (ret < 0) {
      ^~
   fs//ocfs2/aops.c: At top level:
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:425:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:415:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:413:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:404:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:402:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:393:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:391:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:383:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:380:3: note: in expansion of macro 'if'
      if (q_size < size)
      ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:378:3: note: in expansion of macro 'if'
      if (p_size < size)
      ^~
   include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:377:2: note: in expansion of macro 'if'

vim +/if +2437 fs//ocfs2/aops.c

c15471f79 Ryan Ding     2016-03-25  2419  
0e5218c24 Changwei Ge   2017-12-23  2420  /*
0e5218c24 Changwei Ge   2017-12-23  2421   * Will look for holes and unwritten extents in the range starting at
0e5218c24 Changwei Ge   2017-12-23  2422   * pos for count bytes (inclusive).
0e5218c24 Changwei Ge   2017-12-23  2423   */
cbc718f7f Andrew Morton 2017-12-23  2424  static bool ocfs2_range_has_holes(struct inode *inode, loff_t pos, size_t count)
0e5218c24 Changwei Ge   2017-12-23  2425  {
cbc718f7f Andrew Morton 2017-12-23  2426  	bool ret = false;
0e5218c24 Changwei Ge   2017-12-23  2427  	unsigned int extent_flags;
0e5218c24 Changwei Ge   2017-12-23  2428  	u32 cpos, clusters, extent_len, phys_cpos;
0e5218c24 Changwei Ge   2017-12-23  2429  	struct super_block *sb = inode->i_sb;
0e5218c24 Changwei Ge   2017-12-23  2430  
0e5218c24 Changwei Ge   2017-12-23  2431  	cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits;
0e5218c24 Changwei Ge   2017-12-23  2432  	clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos;
0e5218c24 Changwei Ge   2017-12-23  2433  
0e5218c24 Changwei Ge   2017-12-23  2434  	while (clusters) {
0e5218c24 Changwei Ge   2017-12-23  2435  		ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len,
0e5218c24 Changwei Ge   2017-12-23  2436  					 &extent_flags);
0e5218c24 Changwei Ge   2017-12-23 @2437  		if (ret < 0) {
0e5218c24 Changwei Ge   2017-12-23  2438  			mlog_errno(ret);
0e5218c24 Changwei Ge   2017-12-23  2439  			goto out;
0e5218c24 Changwei Ge   2017-12-23  2440  		}
0e5218c24 Changwei Ge   2017-12-23  2441  
0e5218c24 Changwei Ge   2017-12-23  2442  		if (phys_cpos == 0 || (extent_flags & OCFS2_EXT_UNWRITTEN)) {
cbc718f7f Andrew Morton 2017-12-23  2443  			ret = true;
cbc718f7f Andrew Morton 2017-12-23  2444  			goto out;
0e5218c24 Changwei Ge   2017-12-23  2445  		}
0e5218c24 Changwei Ge   2017-12-23  2446  
0e5218c24 Changwei Ge   2017-12-23  2447  		if (extent_len > clusters)
0e5218c24 Changwei Ge   2017-12-23  2448  			extent_len = clusters;
0e5218c24 Changwei Ge   2017-12-23  2449  
0e5218c24 Changwei Ge   2017-12-23  2450  		clusters -= extent_len;
0e5218c24 Changwei Ge   2017-12-23  2451  		cpos += extent_len;
0e5218c24 Changwei Ge   2017-12-23  2452  	}
0e5218c24 Changwei Ge   2017-12-23  2453  out:
0e5218c24 Changwei Ge   2017-12-23  2454  	return ret;
0e5218c24 Changwei Ge   2017-12-23  2455  }
0e5218c24 Changwei Ge   2017-12-23  2456  

:::::: The code at line 2437 was first introduced by commit
:::::: 0e5218c24f42022a11fad0117cfd472c5feb361a ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

:::::: TO: Changwei Ge <ge.changwei@xxxxxxx>
:::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx>

---
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 ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux