llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [alobakin:libeth 10/27] kernel/jump_label.c:185:19: error: use of undeclared identifier 'static_key_slow_inc_cpuslocked'; did you mean 'static_key_slow_dec_deferred'?
@ 2024-10-05 16:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-05 16:13 UTC (permalink / raw)
  To: Alexander Lobakin; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/alobakin/linux libeth
head:   0d0ee8bd78a020881af96974dc0e72416b29d14c
commit: 3aa7a4c6571f539734621e2d103f428abeaf903f [10/27] jump_label: export static_key_slow_{inc,dec}_cpuslocked()
config: x86_64-randconfig-003-20241002 (https://download.01.org/0day-ci/archive/20241006/202410060052.YNWtim6p-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/20241006/202410060052.YNWtim6p-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/202410060052.YNWtim6p-lkp@intel.com/

All errors (new ones prefixed by >>):

         |                    ^
   kernel/jump_label.c:30:6: error: redefinition of 'jump_label_unlock'
      30 | void jump_label_unlock(void)
         |      ^
   include/linux/jump_label.h:318:20: note: previous definition is here
     318 | static inline void jump_label_unlock(void) {}
         |                    ^
   kernel/jump_label.c:43:6: error: call to undeclared function 'jump_entry_key'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      43 |         if (jump_entry_key(jea) < jump_entry_key(jeb))
         |             ^
   kernel/jump_label.c:54:6: error: call to undeclared function 'jump_entry_code'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      54 |         if (jump_entry_code(jea) < jump_entry_code(jeb))
         |             ^
   kernel/jump_label.c:68:20: error: variable has incomplete type 'struct jump_entry'
      68 |         struct jump_entry tmp = *jea;
         |                           ^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:70:5: error: incomplete definition of type 'struct jump_entry'
      70 |         jea->code       = jeb->code - delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:70:17: error: incomplete definition of type 'struct jump_entry'
      70 |         jea->code       = jeb->code - delta;
         |                           ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:71:5: error: incomplete definition of type 'struct jump_entry'
      71 |         jea->target     = jeb->target - delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:71:19: error: incomplete definition of type 'struct jump_entry'
      71 |         jea->target     = jeb->target - delta;
         |                           ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:72:5: error: incomplete definition of type 'struct jump_entry'
      72 |         jea->key        = jeb->key - delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:72:16: error: incomplete definition of type 'struct jump_entry'
      72 |         jea->key        = jeb->key - delta;
         |                           ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:74:5: error: incomplete definition of type 'struct jump_entry'
      74 |         jeb->code       = tmp.code + delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:75:5: error: incomplete definition of type 'struct jump_entry'
      75 |         jeb->target     = tmp.target + delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:76:5: error: incomplete definition of type 'struct jump_entry'
      76 |         jeb->key        = tmp.key + delta;
         |         ~~~^
   kernel/jump_label.c:66:9: note: forward declaration of 'struct jump_entry'
      66 |         struct jump_entry *jea = a;
         |                ^
   kernel/jump_label.c:80:32: warning: declaration of 'struct jump_entry' will not be visible outside of this function [-Wvisibility]
      80 | jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
         |                                ^
   kernel/jump_label.c:89:8: error: invalid application of 'sizeof' to an incomplete type 'struct jump_entry'
      89 |                                         / sizeof(struct jump_entry));
         |                                           ^     ~~~~~~~~~~~~~~~~~~~
   kernel/jump_label.c:80:32: note: forward declaration of 'struct jump_entry'
      80 | jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
         |                                ^
   kernel/jump_label.c:90:20: error: invalid application of 'sizeof' to an incomplete type 'struct jump_entry'
      90 |         sort(start, size, sizeof(struct jump_entry), jump_label_cmp, swapfn);
         |                           ^     ~~~~~~~~~~~~~~~~~~~
   kernel/jump_label.c:80:32: note: forward declaration of 'struct jump_entry'
      80 | jump_label_sort_entries(struct jump_entry *start, struct jump_entry *stop)
         |                                ^
   kernel/jump_label.c:104:5: error: redefinition of 'static_key_count'
     104 | int static_key_count(struct static_key *key)
         |     ^
   include/linux/jump_label.h:259:28: note: previous definition is here
     259 | static __always_inline int static_key_count(struct static_key *key)
         |                            ^
   kernel/jump_label.c:127:6: error: redefinition of 'static_key_fast_inc_not_disabled'
     127 | bool static_key_fast_inc_not_disabled(struct static_key *key)
         |      ^
   include/linux/jump_label.h:285:20: note: previous definition is here
     285 | static inline bool static_key_fast_inc_not_disabled(struct static_key *key)
         |                    ^
>> kernel/jump_label.c:185:19: error: use of undeclared identifier 'static_key_slow_inc_cpuslocked'; did you mean 'static_key_slow_dec_deferred'?
     185 | EXPORT_SYMBOL_GPL(static_key_slow_inc_cpuslocked);
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                   static_key_slow_dec_deferred
   include/linux/export.h:69:48: note: expanded from macro 'EXPORT_SYMBOL_GPL'
      69 | #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
         |                                                        ^
   include/linux/export.h:65:54: note: expanded from macro '_EXPORT_SYMBOL'
      65 | #define _EXPORT_SYMBOL(sym, license)    __EXPORT_SYMBOL(sym, license, "")
         |                                                         ^
   include/linux/export.h:56:16: note: expanded from macro '__EXPORT_SYMBOL'
      56 |         extern typeof(sym) sym;                                 \
         |                       ^
   include/linux/jump_label_ratelimit.h:80:20: note: 'static_key_slow_dec_deferred' declared here
      80 | static inline void static_key_slow_dec_deferred(struct static_key_deferred *key)
         |                    ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   1 warning and 20 errors generated.


vim +185 kernel/jump_label.c

   150	
   151	bool static_key_slow_inc_cpuslocked(struct static_key *key)
   152	{
   153		lockdep_assert_cpus_held();
   154	
   155		/*
   156		 * Careful if we get concurrent static_key_slow_inc/dec() calls;
   157		 * later calls must wait for the first one to _finish_ the
   158		 * jump_label_update() process.  At the same time, however,
   159		 * the jump_label_update() call below wants to see
   160		 * static_key_enabled(&key) for jumps to be updated properly.
   161		 */
   162		if (static_key_fast_inc_not_disabled(key))
   163			return true;
   164	
   165		guard(mutex)(&jump_label_mutex);
   166		/* Try to mark it as 'enabling in progress. */
   167		if (!atomic_cmpxchg(&key->enabled, 0, -1)) {
   168			jump_label_update(key);
   169			/*
   170			 * Ensure that when static_key_fast_inc_not_disabled() or
   171			 * static_key_dec_not_one() observe the positive value,
   172			 * they must also observe all the text changes.
   173			 */
   174			atomic_set_release(&key->enabled, 1);
   175		} else {
   176			/*
   177			 * While holding the mutex this should never observe
   178			 * anything else than a value >= 1 and succeed
   179			 */
   180			if (WARN_ON_ONCE(!static_key_fast_inc_not_disabled(key)))
   181				return false;
   182		}
   183		return true;
   184	}
 > 185	EXPORT_SYMBOL_GPL(static_key_slow_inc_cpuslocked);
   186	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-05 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05 16:13 [alobakin:libeth 10/27] kernel/jump_label.c:185:19: error: use of undeclared identifier 'static_key_slow_inc_cpuslocked'; did you mean 'static_key_slow_dec_deferred'? kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).