All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Ahern <dsahern@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [dsahern:netdevsim-speed 1/1] drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token
Date: Tue, 28 Oct 2025 22:00:24 +0800	[thread overview]
Message-ID: <202510282136.k3sjWcCl-lkp@intel.com> (raw)

tree:   https://github.com/dsahern/linux netdevsim-speed
head:   ae20d62bc3e42f44ed7113d792ceb545036ca61d
commit: ae20d62bc3e42f44ed7113d792ceb545036ca61d [1/1] netdevsim: Add ability to change speed via ethtool APIs
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20251028/202510282136.k3sjWcCl-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251028/202510282136.k3sjWcCl-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/202510282136.k3sjWcCl-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/net/netdevsim/netdevsim.h:18,
                    from drivers/net/netdevsim/ethtool.c:8:
   drivers/net/netdevsim/ethtool.c: In function 'nsim_get_link_ksettings':
>> include/linux/ethtool.h:260:19: error: pasting "ETHTOOL_LINK_MODE_" and "(" does not give a valid preprocessing token
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                   ^~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |                                                                  ^
   include/linux/ethtool.h:260:41: note: in definition of macro 'ethtool_link_ksettings_add_link_mode'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                         ^~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/thread_info.h:27,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/sh/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:7,
                    from include/linux/debugfs.h:15,
                    from drivers/net/netdevsim/ethtool.c:4:
>> include/linux/ethtool.h:260:19: error: implicit declaration of function 'ETHTOOL_LINK_MODE_' [-Wimplicit-function-declaration]
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                   ^~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/ethtool.c:239:32: error: 'Autoneg' undeclared (first use in this function)
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |                                ^~~~~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:32: note: each undeclared identifier is reported only once for each function it appears in
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |                                ^~~~~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:43:31: note: to match this '('
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                               ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:20: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                    ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:19: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                   ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bitops.h:28:
>> include/asm-generic/bitops/generic-non-atomic.h:147:41: error: too few arguments to function 'generic___set_bit'; expected 2, have 1
     147 | #define const___set_bit                 generic___set_bit
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:10: note: in expansion of macro 'const___set_bit'
      47 |          const##op(nr, addr) : op(nr, addr))
         |          ^~~~~
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:28:1: note: declared here
      28 | generic___set_bit(unsigned long nr, volatile unsigned long *addr)
         | ^~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:35: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                   ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:34: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                  ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/asm-generic/bitops/non-atomic.h:7:24: error: too few arguments to function 'generic___set_bit'; expected 2, have 1
       7 | #define arch___set_bit generic___set_bit
         |                        ^~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:32: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                ^~
   include/asm-generic/bitops/non-instrumented-non-atomic.h:6:33: note: in expansion of macro 'arch___set_bit'
       6 | #define ___set_bit              arch___set_bit
         |                                 ^~~~~~~~~~~~~~
   include/linux/bitops.h:53:47: note: in expansion of macro '___set_bit'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                               ^~~~~~~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:28:1: note: declared here
      28 | generic___set_bit(unsigned long nr, volatile unsigned long *addr)
         | ^~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:19: error: pasting "ETHTOOL_LINK_MODE_" and "(" does not give a valid preprocessing token
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                   ^~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:68: error: pasting ")" and "_BIT" does not give a valid preprocessing token
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |                                                                    ^
   include/linux/ethtool.h:260:41: note: in definition of macro 'ethtool_link_ksettings_add_link_mode'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                         ^~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:43:31: note: to match this '('
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                               ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:20: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                    ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:19: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                   ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/asm-generic/bitops/generic-non-atomic.h:147:41: error: too few arguments to function 'generic___set_bit'; expected 2, have 1
     147 | #define const___set_bit                 generic___set_bit
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:10: note: in expansion of macro 'const___set_bit'
      47 |          const##op(nr, addr) : op(nr, addr))
         |          ^~~~~
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:28:1: note: declared here
      28 | generic___set_bit(unsigned long nr, volatile unsigned long *addr)
         | ^~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:35: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                   ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:34: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                  ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/asm-generic/bitops/non-atomic.h:7:24: error: too few arguments to function 'generic___set_bit'; expected 2, have 1
       7 | #define arch___set_bit generic___set_bit
         |                        ^~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:32: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                ^~
   include/asm-generic/bitops/non-instrumented-non-atomic.h:6:33: note: in expansion of macro 'arch___set_bit'
       6 | #define ___set_bit              arch___set_bit
         |                                 ^~~~~~~~~~~~~~
   include/linux/bitops.h:53:47: note: in expansion of macro '___set_bit'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                               ^~~~~~~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:237:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     237 |         ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:239:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     239 |         NETDEVSIM_ETHTOOL_MODE(Autoneg);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:28:1: note: declared here
      28 | generic___set_bit(unsigned long nr, volatile unsigned long *addr)
         | ^~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:19: error: pasting "ETHTOOL_LINK_MODE_" and "(" does not give a valid preprocessing token
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                   ^~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |                                                                  ^
   include/linux/ethtool.h:260:41: note: in definition of macro 'ethtool_link_ksettings_add_link_mode'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                         ^~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/ethtool.c:240:32: error: invalid suffix 'baseT_Full' on integer constant
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |                                ^~~~~~~~~~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:43:31: note: to match this '('
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                               ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/netdevsim/ethtool.c:240:32: error: invalid suffix 'baseT_Full' on integer constant
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |                                ^~~~~~~~~~~~
   include/linux/bitops.h:47:20: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                    ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:20: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                    ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:19: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                   ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:147:41: error: too few arguments to function 'generic___set_bit'; expected 2, have 1
     147 | #define const___set_bit                 generic___set_bit
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:10: note: in expansion of macro 'const___set_bit'
      47 |          const##op(nr, addr) : op(nr, addr))
         |          ^~~~~
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                         ^~~~~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bitops/generic-non-atomic.h:28:1: note: declared here
      28 | generic___set_bit(unsigned long nr, volatile unsigned long *addr)
         | ^~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:32: error: invalid suffix 'baseT_Full' on integer constant
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |                                ^~~~~~~~~~~~
   include/linux/bitops.h:47:35: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                   ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/ethtool.h:260:49: error: expected ')' before '_BIT'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |                                                 ^~~~
   include/linux/bitops.h:47:35: note: in definition of macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                   ^~
   include/linux/ethtool.h:260:9: note: in expansion of macro '__set_bit'
     260 |         __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
         |         ^~~~~~~~~
   drivers/net/netdevsim/ethtool.c:236:9: note: in expansion of macro 'ethtool_link_ksettings_add_link_mode'
     236 |         ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netdevsim/ethtool.c:240:9: note: in expansion of macro 'NETDEVSIM_ETHTOOL_MODE'
     240 |         NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitops.h:47:34: note: to match this '('
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                  ^
   include/linux/bitops.h:53:41: note: in expansion of macro 'bitop'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
..


vim +236 drivers/net/netdevsim/ethtool.c

   226	
   227	static int nsim_get_link_ksettings(struct net_device *dev,
   228					  struct ethtool_link_ksettings *ks)
   229	{
   230		struct netdevsim *ns = netdev_priv(dev);
   231	
   232		ethtool_link_ksettings_zero_link_mode(ks, supported);
   233	        ethtool_link_ksettings_zero_link_mode(ks, advertising);
   234	
   235	#define NETDEVSIM_ETHTOOL_MODE(mode) \
 > 236		ethtool_link_ksettings_add_link_mode(ks, supported, (mode)); \
   237		ethtool_link_ksettings_add_link_mode(ks, advertising, (mode));
   238	
 > 239		NETDEVSIM_ETHTOOL_MODE(Autoneg);
 > 240		NETDEVSIM_ETHTOOL_MODE(10baseT_Full);
   241		NETDEVSIM_ETHTOOL_MODE(100baseT_Full);
   242		NETDEVSIM_ETHTOOL_MODE(1000baseT_Full);
   243		NETDEVSIM_ETHTOOL_MODE(10000baseT_Full);
   244	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-10-28 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 14:00 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-29 13:02 [dsahern:netdevsim-speed 1/1] drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510282136.k3sjWcCl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dsahern@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.