Hi Shawn,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.1-rc1]
[cannot apply to next-20190318]
[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/Shawn-Landden/Use-fall-through-attribute-rather-than-magic-comments/20190318-194548
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   In file included from include/linux/compiler_types.h:59,
                    from <command-line>:
   drivers/infiniband/hw/i40iw/i40iw_main.c: In function 'i40iw_deinit_device':
   include/linux/compiler_attributes.h:261:43: warning: attribute 'fallthrough' 
not preceding a case label or default label
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^~~~~~~~~~~~~
   drivers/infiniband/hw/i40iw/i40iw_main.c:1498:3: note: in expansion of macro 
'__fallthrough'
      __fallthrough;
      ^~~~~~~~~~~~~
>> include/linux/compiler_attributes.h:261:43: error: invalid use of attribute 
>> 'fallthrough'
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^~~~~~~~~~~~~
   drivers/infiniband/hw/i40iw/i40iw_main.c:1499:3: note: in expansion of macro 
'__fallthrough'
      __fallthrough;
      ^~~~~~~~~~~~~
--
   In file included from include/linux/compiler_types.h:59,
                    from <command-line>:
   drivers/infiniband//hw/i40iw/i40iw_main.c: In function 'i40iw_deinit_device':
   include/linux/compiler_attributes.h:261:43: warning: attribute 'fallthrough' 
not preceding a case label or default label
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^~~~~~~~~~~~~
   drivers/infiniband//hw/i40iw/i40iw_main.c:1498:3: note: in expansion of 
macro '__fallthrough'
      __fallthrough;
      ^~~~~~~~~~~~~
>> include/linux/compiler_attributes.h:261:43: error: invalid use of attribute 
>> 'fallthrough'
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^~~~~~~~~~~~~
   drivers/infiniband//hw/i40iw/i40iw_main.c:1499:3: note: in expansion of 
macro '__fallthrough'
      __fallthrough;
      ^~~~~~~~~~~~~

vim +/fallthrough +261 include/linux/compiler_attributes.h

   255  
   256  /*
   257   *   gcc: 
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough
   258   *   gcc: 
https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
   259   */
   260  #if __has_attribute(__fallthrough__)
 > 261  # define __fallthrough                    
 > __attribute__((__fallthrough__))
   262  #else
   263  # define __fallthrough
   264  #endif
   265  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to