All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gabriel Somlo <gsomlo@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [litex-hub:litex-rebase 8/18] drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'class_spin_lock_irqsave_t'; did you mean '_raw_spin_lock_irqsave'?
Date: Wed, 2 Apr 2025 15:11:46 +0800	[thread overview]
Message-ID: <202504021531.LSDxngLf-lkp@intel.com> (raw)

tree:   https://github.com/litex-hub/linux litex-rebase
head:   27cd831fb75ec1b1667350dcdad43e58d34ac9f5
commit: 639fd3757f161027e4f8ec56033e598bf06d7923 [8/18] fixup: use scoped_guard() with LiteGPIO
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250402/202504021531.LSDxngLf-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250402/202504021531.LSDxngLf-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/202504021531.LSDxngLf-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'class_spin_lock_irqsave_t'; did you mean '_raw_spin_lock_irqsave'?
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:7: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |              ^
   include/linux/cleanup.h:258:2: note: expanded from macro 'CLASS'
     258 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
         |         ^
   <scratch space>:159:1: note: expanded from here
     159 | class_spin_lock_irqsave_t
         | ^
   include/linux/spinlock_api_smp.h:32:26: note: '_raw_spin_lock_irqsave' declared here
      32 | unsigned long __lockfunc _raw_spin_lock_irqsave(raw_spinlock_t *lock)
         |                          ^
>> drivers/gpio/gpio-litex.c:157:2: error: expected ';' in 'for' statement specifier
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:20: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |                           ^
>> drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'scope'; did you mean 'sclp'?
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:20: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |                           ^
   arch/s390/include/asm/sclp.h:119:25: note: 'sclp' declared here
     119 | extern struct sclp_info sclp;
         |                         ^
>> drivers/gpio/gpio-litex.c:157:2: error: expected ';' in 'for' statement specifier
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:7: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |              ^
   include/linux/cleanup.h:258:24: note: expanded from macro 'CLASS'
     258 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
         |                               ^
   include/linux/compiler-clang.h:15:25: note: expanded from macro '__cleanup'
      15 | #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
         |                         ^
   include/linux/compiler_attributes.h:343:41: note: expanded from macro '__maybe_unused'
     343 | #define __maybe_unused                  __attribute__((__unused__))
         |                                         ^
>> drivers/gpio/gpio-litex.c:157:2: error: call to undeclared function 'class_spin_lock_irqsave_lock_ptr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:7: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |              ^
   include/linux/cleanup.h:321:28: note: expanded from macro '__guard_ptr'
     321 | #define __guard_ptr(_name) class_##_name##_lock_ptr
         |                            ^
   <scratch space>:165:1: note: expanded from here
     165 | class_spin_lock_irqsave_lock_ptr
         | ^
   drivers/gpio/gpio-litex.c:157:2: note: did you mean 'class_spinlock_irqsave_lock_ptr'?
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:7: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |              ^
   include/linux/cleanup.h:321:28: note: expanded from macro '__guard_ptr'
     321 | #define __guard_ptr(_name) class_##_name##_lock_ptr
         |                            ^
   <scratch space>:165:1: note: expanded from here
     165 | class_spin_lock_irqsave_lock_ptr
         | ^
   include/linux/spinlock.h:585:1: note: 'class_spinlock_irqsave_lock_ptr' declared here
     585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t,
         | ^
   include/linux/cleanup.h:408:49: note: expanded from macro 'DEFINE_LOCK_GUARD_1'
     408 | __DEFINE_CLASS_IS_CONDITIONAL(_name, false);                            \
         |                                                                         ^
   include/linux/cleanup.h:387:10: note: expanded from macro '\
   __DEFINE_UNLOCK_GUARD'
     387 |                                                                         \
         |                                                                         ^
   include/linux/cleanup.h:295:23: note: expanded from macro '\
   __DEFINE_GUARD_LOCK_PTR'
     295 |         static inline void * class_##_name##_lock_ptr(class_##_name##_t *_T) \
         |                              ^
   <scratch space>:133:1: note: expanded from here
     133 | class_spinlock_irqsave_lock_ptr
         | ^
>> drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'scope'; did you mean 'sclp'?
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:27: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |                                  ^
   arch/s390/include/asm/sclp.h:119:25: note: 'sclp' declared here
     119 | extern struct sclp_info sclp;
         |                         ^
>> drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'class_spin_lock_irqsave_is_conditional'; did you mean 'class_spinlock_irqsave_is_conditional'?
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:38: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |                                             ^
   include/linux/cleanup.h:322:30: note: expanded from macro '__is_cond_ptr'
     322 | #define __is_cond_ptr(_name) class_##_name##_is_conditional
         |                              ^
   <scratch space>:167:1: note: expanded from here
     167 | class_spin_lock_irqsave_is_conditional
         | ^
   include/linux/spinlock.h:585:1: note: 'class_spinlock_irqsave_is_conditional' declared here
     585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t,
         | ^
   include/linux/cleanup.h:407:65: note: expanded from macro 'DEFINE_LOCK_GUARD_1'
     407 | #define DEFINE_LOCK_GUARD_1(_name, _type, _lock, _unlock, ...)          \
         |                                                                         ^
   include/linux/cleanup.h:292:34: note: expanded from macro '\
   __DEFINE_CLASS_IS_CONDITIONAL'
     292 | static __maybe_unused const bool class_##_name##_is_conditional = _is_cond
         |                                  ^
   <scratch space>:125:1: note: expanded from here
     125 | class_spinlock_irqsave_is_conditional
         | ^
>> drivers/gpio/gpio-litex.c:157:2: error: expected ')'
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:58: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |                                                                 ^
   drivers/gpio/gpio-litex.c:157:2: note: to match this '('
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:6: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |             ^
>> drivers/gpio/gpio-litex.c:157:2: error: expected ';' after expression
     157 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:336:25: note: expanded from macro '__scoped_guard'
     336 |              ({ goto _label; }))                                        \
         |                                ^
>> drivers/gpio/gpio-litex.c:157:2: error: expected expression
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:336:25: note: expanded from macro '__scoped_guard'
     336 |              ({ goto _label; }))                                        \
         |                                ^
>> drivers/gpio/gpio-litex.c:157:2: error: use of undeclared label '__UNIQUE_ID_label556'
   include/linux/cleanup.h:343:24: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |                               ^
   include/linux/compiler.h:166:29: note: expanded from macro '__UNIQUE_ID'
     166 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^
   include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
      83 | #define ___PASTE(a,b) a##b
         |                       ^
   <scratch space>:157:1: note: expanded from here
     157 | __UNIQUE_ID_label556
         | ^
   drivers/gpio/gpio-litex.c:173:2: error: use of undeclared identifier 'class_spin_lock_irqsave_t'; did you mean '_raw_spin_lock_irqsave'?
     173 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:7: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |              ^
   include/linux/cleanup.h:258:2: note: expanded from macro 'CLASS'
     258 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
         |         ^
   <scratch space>:173:1: note: expanded from here
     173 | class_spin_lock_irqsave_t
         | ^
   include/linux/spinlock_api_smp.h:32:26: note: '_raw_spin_lock_irqsave' declared here
      32 | unsigned long __lockfunc _raw_spin_lock_irqsave(raw_spinlock_t *lock)
         |                          ^
   drivers/gpio/gpio-litex.c:173:2: error: expected ';' in 'for' statement specifier
     173 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:20: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |                           ^
   drivers/gpio/gpio-litex.c:173:2: error: use of undeclared identifier 'scope'; did you mean 'sclp'?
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:20: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |                           ^
   arch/s390/include/asm/sclp.h:119:25: note: 'sclp' declared here
     119 | extern struct sclp_info sclp;
         |                         ^
   drivers/gpio/gpio-litex.c:173:2: error: expected ';' in 'for' statement specifier
     173 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:334:7: note: expanded from macro '__scoped_guard'
     334 |         for (CLASS(_name, scope)(args);                                 \
         |              ^
   include/linux/cleanup.h:258:24: note: expanded from macro 'CLASS'
     258 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
         |                               ^
   include/linux/compiler-clang.h:15:25: note: expanded from macro '__cleanup'
      15 | #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
         |                         ^
   include/linux/compiler_attributes.h:343:41: note: expanded from macro '__maybe_unused'
     343 | #define __maybe_unused                  __attribute__((__unused__))
         |                                         ^
   drivers/gpio/gpio-litex.c:173:2: error: call to undeclared function 'class_spin_lock_irqsave_lock_ptr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:7: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |              ^
   include/linux/cleanup.h:321:28: note: expanded from macro '__guard_ptr'
     321 | #define __guard_ptr(_name) class_##_name##_lock_ptr
         |                            ^
   <scratch space>:179:1: note: expanded from here
     179 | class_spin_lock_irqsave_lock_ptr
         | ^
   drivers/gpio/gpio-litex.c:173:2: error: use of undeclared identifier 'scope'; did you mean 'sclp'?
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:27: note: expanded from macro '__scoped_guard'
     335 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |                                  ^
   arch/s390/include/asm/sclp.h:119:25: note: 'sclp' declared here
     119 | extern struct sclp_info sclp;
         |                         ^
   drivers/gpio/gpio-litex.c:173:2: error: use of undeclared identifier 'class_spin_lock_irqsave_is_conditional'; did you mean 'class_spinlock_irqsave_is_conditional'?
     173 |         scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
         |         ^
   include/linux/cleanup.h:343:2: note: expanded from macro 'scoped_guard'
     343 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:335:38: note: expanded from macro '__scoped_guard'


vim +157 drivers/gpio/gpio-litex.c

   145	
   146	static void litex_gpio_irq_unmask(struct irq_data *idata)
   147	{
   148		struct gpio_chip *chip = irq_data_get_irq_chip_data(idata);
   149		struct litex_gpio *gpio_s = gpiochip_get_data(chip);
   150		int offset = irqd_to_hwirq(idata) % GPIO_PINS_MAX;
   151		u32 bit = BIT(offset);
   152		u32 enable;
   153	
   154		gpiochip_enable_irq(chip, idata->hwirq);
   155	
   156		/* Clear any sticky pending interrupts */
 > 157		scoped_guard(spin_lock_irqsave, &gpio_s->gpio_lock) {
   158			litex_gpio_set_reg(gpio_s, LITEX_GPIO_PENDING_OFFSET, bit);
   159			enable = litex_gpio_get_reg(gpio_s, LITEX_GPIO_ENABLE_OFFSET);
   160			enable |= bit;
   161			litex_gpio_set_reg(gpio_s, LITEX_GPIO_ENABLE_OFFSET, enable);
   162		}
   163	}
   164	

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

             reply	other threads:[~2025-04-02  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  7:11 kernel test robot [this message]
2025-04-02 14:40 ` [litex-hub:litex-rebase 8/18] drivers/gpio/gpio-litex.c:157:2: error: use of undeclared identifier 'class_spin_lock_irqsave_t'; did you mean '_raw_spin_lock_irqsave'? Gabriel L. Somlo

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=202504021531.LSDxngLf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gsomlo@gmail.com \
    --cc=llvm@lists.linux.dev \
    --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.