All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [l1k:thunderbolt_associate_v1 1/4] drivers/thunderbolt/tb.h:46:42: error: 'MAX_GROUPS' undeclared here (not in a function)
Date: Sat, 27 Apr 2024 18:37:48 +0800	[thread overview]
Message-ID: <202404271807.Xk8RbUr3-lkp@intel.com> (raw)

Hi Lukas,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://github.com/l1k/linux thunderbolt_associate_v1
head:   d02e8bddd00b2f29505e20a45417c494103dfc1d
commit: 51701e88f5c194db1854478cb2e388958fd6c32f [1/4] thunderbolt: Move struct tb_cm to tb.h
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240427/202404271807.Xk8RbUr3-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240427/202404271807.Xk8RbUr3-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/202404271807.Xk8RbUr3-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/thunderbolt/nhi.c:26:
>> drivers/thunderbolt/tb.h:46:42: error: 'MAX_GROUPS' undeclared here (not in a function)
      46 |         struct tb_bandwidth_group groups[MAX_GROUPS];
         |                                          ^~~~~~~~~~
--
   In file included from drivers/thunderbolt/tb.c:15:
>> drivers/thunderbolt/tb.h:46:42: error: 'MAX_GROUPS' undeclared here (not in a function)
      46 |         struct tb_bandwidth_group groups[MAX_GROUPS];
         |                                          ^~~~~~~~~~
   In file included from include/linux/init.h:5,
                    from include/linux/printk.h:6,
                    from include/asm-generic/bug.h:22,
                    from arch/alpha/include/asm/bug.h:23,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/alpha/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from drivers/thunderbolt/tb.c:9:
   drivers/thunderbolt/tb.c: In function 'tb_recalc_estimated_bandwidth':
   include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:237:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     237 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/thunderbolt/tb.c:1427:25: note: in expansion of macro 'ARRAY_SIZE'
    1427 |         for (i = 0; i < ARRAY_SIZE(tcm->groups); i++) {
         |                         ^~~~~~~~~~
   drivers/thunderbolt/tb.c: In function 'tb_init_bandwidth_groups':
   include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:237:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     237 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/thunderbolt/tb.c:1489:25: note: in expansion of macro 'ARRAY_SIZE'
    1489 |         for (i = 0; i < ARRAY_SIZE(tcm->groups); i++) {
         |                         ^~~~~~~~~~
   drivers/thunderbolt/tb.c: In function 'tb_find_free_bandwidth_group':
   include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:237:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     237 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/thunderbolt/tb.c:1516:25: note: in expansion of macro 'ARRAY_SIZE'
    1516 |         for (i = 0; i < ARRAY_SIZE(tcm->groups); i++) {
         |                         ^~~~~~~~~~
   drivers/thunderbolt/tb.c: In function 'tb_discover_bandwidth_group':
   include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:237:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     237 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/thunderbolt/tb.c:1570:33: note: in expansion of macro 'ARRAY_SIZE'
    1570 |                 for (i = 0; i < ARRAY_SIZE(tcm->groups); i++) {
         |                                 ^~~~~~~~~~
   drivers/thunderbolt/tb.c: In function 'tb_deinit':
   include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:237:33: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     237 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
      11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   drivers/thunderbolt/tb.c:2754:25: note: in expansion of macro 'ARRAY_SIZE'
    2754 |         for (i = 0; i < ARRAY_SIZE(tcm->groups); i++)
         |                         ^~~~~~~~~~


vim +/MAX_GROUPS +46 drivers/thunderbolt/tb.h

    28	
    29	/**
    30	 * struct tb_cm - Simple Thunderbolt connection manager
    31	 * @tunnel_list: List of active tunnels
    32	 * @dp_resources: List of available DP resources for DP tunneling
    33	 * @hotplug_active: tb_handle_hotplug will stop progressing plug
    34	 *		    events and exit if this is not set (it needs to
    35	 *		    acquire the lock one more time). Used to drain wq
    36	 *		    after cfg has been paused.
    37	 * @remove_work: Work used to remove any unplugged routers after
    38	 *		 runtime resume
    39	 * @groups: Bandwidth groups used in this domain.
    40	 */
    41	struct tb_cm {
    42		struct list_head tunnel_list;
    43		struct list_head dp_resources;
    44		bool hotplug_active;
    45		struct delayed_work remove_work;
  > 46		struct tb_bandwidth_group groups[MAX_GROUPS];
    47	};
    48	

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

                 reply	other threads:[~2024-04-27 10:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202404271807.Xk8RbUr3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=lukas@wunner.de \
    --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.