Hi Shawn,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING 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: x86_64-randconfig-x014-201911 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/compiler_types.h:59:0,
                    from <command-line>:0:
   drivers/net/can/spi/mcp251x.c: In function 'mcp251x_can_ist':
>> include/linux/compiler_attributes.h:261:43: warning: attribute 'fallthrough' 
>> not preceding a case label or default label
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^
>> drivers/net/can/spi/mcp251x.c:878:33: note: in expansion of macro 
>> '__fallthrough'
      case CAN_STATE_ERROR_WARNING: __fallthrough;
                                    ^~~~~~~~~~~~~
--
   In file included from include/linux/compiler_types.h:59:0,
                    from <command-line>:0:
   drivers/net//can/spi/mcp251x.c: In function 'mcp251x_can_ist':
>> include/linux/compiler_attributes.h:261:43: warning: attribute 'fallthrough' 
>> not preceding a case label or default label
    # define __fallthrough                    __attribute__((__fallthrough__))
                                              ^
   drivers/net//can/spi/mcp251x.c:878:33: note: in expansion of macro 
'__fallthrough'
      case CAN_STATE_ERROR_WARNING: __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