All of lore.kernel.org
 help / color / mirror / Atom feed
* [dsahern:netdevsim-speed 1/1] drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token
@ 2025-10-28 14:00 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-10-28 14:00 UTC (permalink / raw)
  To: David Ahern; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dsahern:netdevsim-speed 1/1] drivers/net/netdevsim/ethtool.c:236:66: error: pasting ")" and "_BIT" does not give a valid preprocessing token
@ 2025-10-29 13:02 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-10-29 13:02 UTC (permalink / raw)
  To: David Ahern; +Cc: oe-kbuild-all

tree:   https://github.com/dsahern/linux netdevsim-speed
head:   ae20d62bc3e42f44ed7113d792ceb545036ca61d
commit: ae20d62bc3e42f44ed7113d792ceb545036ca61d [1/1] netdevsim: Add ability to change speed via ethtool APIs
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20251029/202510291417.ajHJ4rB4-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/20251029/202510291417.ajHJ4rB4-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/202510291417.ajHJ4rB4-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/linux/spinlock.h:60,
                    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'
     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/linux/bitops.h:53:47: error: too few arguments to function '___set_bit'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                               ^~~~~~~~~~
   include/linux/bitops.h:47:32: 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);
         |         ^~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bitops.h:424,
                    from include/linux/bitops.h:67:
   include/asm-generic/bitops/instrumented-non-atomic.h:26:1: note: declared here
      26 | ___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'
     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/linux/bitops.h:53:47: error: too few arguments to function '___set_bit'
      53 | #define __set_bit(nr, addr)             bitop(___set_bit, nr, addr)
         |                                               ^~~~~~~~~~
   include/linux/bitops.h:47:32: 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/asm-generic/bitops/instrumented-non-atomic.h:26:1: note: declared here
      26 | ___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'
     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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-29 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 14:00 [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
  -- strict thread matches above, loose matches on Subject: below --
2025-10-29 13:02 kernel test robot

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.