Re: [PATCH net-next v1 2/7] net: hsr: replace fallthrough comments with fallthrough macro

kernel test robot
2026-03-26T13:34:45Z

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url: https://github.com/intel-lab-lkp/linux/commits/luka-gejak-linux-dev/net-hsr-constify-hsr_ops-and-prp_ops-protocol-operation-structures/20260326-143638
base: net-next/main
patch link: https://lore.kernel.org/r/20260324144630.189094-3-luka.gejak%40linux.dev
patch subject: [PATCH net-next v1 2/7] net: hsr: replace fallthrough comments with fallthrough macro
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260326/202603261419.jqhvfAVi-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260326/202603261419.jqhvfAVi-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603261419.jqhvfAVi-lkp@intel.com/

All errors (new ones prefixed by >>):

In file included from include/linux/compiler_types.h:88,
from <command-line>:
net/hsr/hsr_netlink.c: In function 'hsr_get_node_status':
>> include/linux/compiler_attributes.h:214:41: error: invalid use of attribute 'fallthrough'
214 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
net/hsr/hsr_netlink.c:436:9: note: in expansion of macro 'fallthrough'
436 | fallthrough;
| ^~~~~~~~~~~
net/hsr/hsr_netlink.c: In function 'hsr_get_node_list':
>> include/linux/compiler_attributes.h:214:41: error: invalid use of attribute 'fallthrough'
214 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
net/hsr/hsr_netlink.c:527:9: note: in expansion of macro 'fallthrough'
527 | fallthrough;
| ^~~~~~~~~~~
--
In file included from include/linux/compiler_types.h:88,
from <command-line>:
hsr_netlink.c: In function 'hsr_get_node_status':
>> include/linux/compiler_attributes.h:214:41: error: invalid use of attribute 'fallthrough'
214 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
hsr_netlink.c:436:9: note: in expansion of macro 'fallthrough'
436 | fallthrough;
| ^~~~~~~~~~~
hsr_netlink.c: In function 'hsr_get_node_list':
>> include/linux/compiler_attributes.h:214:41: error: invalid use of attribute 'fallthrough'
214 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
hsr_netlink.c:527:9: note: in expansion of macro 'fallthrough'
527 | fallthrough;
| ^~~~~~~~~~~

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

294f69e662d157 Joe Perches 2019-10-05 201
294f69e662d157 Joe Perches 2019-10-05 202 /*
294f69e662d157 Joe Perches 2019-10-05 203 * Add the pseudo keyword 'fallthrough' so case statement blocks
294f69e662d157 Joe Perches 2019-10-05 204 * must end with any of these keywords:
294f69e662d157 Joe Perches 2019-10-05 205 * break;
294f69e662d157 Joe Perches 2019-10-05 206 * fallthrough;
ca0760e7d79e2b Wei Ming Chen 2021-05-06 207 * continue;
294f69e662d157 Joe Perches 2019-10-05 208 * goto ;
294f69e662d157 Joe Perches 2019-10-05 209 * return [expression];
294f69e662d157 Joe Perches 2019-10-05 210 *
294f69e662d157 Joe Perches 2019-10-05 211 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes
294f69e662d157 Joe Perches 2019-10-05 212 */
294f69e662d157 Joe Perches 2019-10-05 213 #if __has_attribute(__fallthrough__)
294f69e662d157 Joe Perches 2019-10-05 @214 # define fallthrough __attribute__((__fallthrough__))
294f69e662d157 Joe Perches 2019-10-05 215 #else
294f69e662d157 Joe Perches 2019-10-05 216 # define fallthrough do {} while (0) /* fallthrough */
a3f8a30f3f0079 Miguel Ojeda 2018-08-30 217 #endif
a3f8a30f3f0079 Miguel Ojeda 2018-08-30 218

--
0-DAY CI Kernel Test Service