All of lore.kernel.org
 help / color / mirror / Atom feed
* [boqun:rust-sync 12/17] kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
@ 2026-02-06  3:13 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-02-06  3:13 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: oe-kbuild-all, Boqun Feng, Lyude Paul

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync
head:   3ef437b5dd8b13bd88b1512531391ad30c26d539
commit: 6969095afa2073e65ecc958bb5064ddf808309b3 [12/17] preempt: Introduce HARDIRQ_DISABLE_BITS and PREEMPT_LONG
config: x86_64-rhel-9.4-kunit (https://download.01.org/0day-ci/archive/20260206/202602060417.9K70cRen-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/20260206/202602060417.9K70cRen-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/202602060417.9K70cRen-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:31,
                    from arch/x86/include/asm/bug.h:193,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/linux/list.h:11,
                    from include/linux/smp.h:12,
                    from include/linux/kernel_stat.h:5,
                    from kernel/softirq.c:13:
   kernel/softirq.c: In function 'handle_softirqs':
>> include/linux/kern_levels.h:5:25: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'long int' [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:484:25: note: in definition of macro 'printk_index_wrap'
     484 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:555:9: note: in expansion of macro 'printk'
     555 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
      11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
         |                         ^~~~~~~~
   include/linux/printk.h:555:16: note: in expansion of macro 'KERN_ERR'
     555 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~
   kernel/softirq.c:633:25: note: in expansion of macro 'pr_err'
     633 |                         pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
         |                         ^~~~~~
--
>> kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
    8867 | void __cant_sleep(const char *file, int line, long preempt_offset)
         |      ^~~~~~~~~~~~
   In file included from include/linux/random.h:7,
                    from include/linux/nodemask.h:94,
                    from include/linux/numa.h:6,
                    from include/linux/cpumask.h:15,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/sched.h:37,
                    from kernel/sched/core.c:11:
   include/linux/kernel.h:78:13: note: previous declaration of '__cant_sleep' with type 'void(const char *, int,  int)'
      78 | extern void __cant_sleep(const char *file, int line, int preempt_offset);
         |             ^~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from arch/x86/include/asm/cache.h:5,
                    from include/vdso/cache.h:5,
                    from include/linux/cache.h:6,
                    from arch/x86/include/asm/current.h:10,
                    from include/linux/sched.h:12:
   kernel/sched/core.c:8893:19: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
    8893 | EXPORT_SYMBOL_GPL(__cant_sleep);
         |                   ^~~~~~~~~~~~
   include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
      76 |         extern typeof(sym) sym;                                 \
         |                            ^~~
   include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
      90 | #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
         |                                         ^~~~~~~~~~~~~~
   kernel/sched/core.c:8893:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    8893 | EXPORT_SYMBOL_GPL(__cant_sleep);
         | ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:78:13: note: previous declaration of '__cant_sleep' with type 'void(const char *, int,  int)'
      78 | extern void __cant_sleep(const char *file, int line, int preempt_offset);
         |             ^~~~~~~~~~~~


vim +8867 kernel/sched/core.c

  8866	
> 8867	void __cant_sleep(const char *file, int line, long preempt_offset)
  8868	{
  8869		static unsigned long prev_jiffy;
  8870	
  8871		if (irqs_disabled())
  8872			return;
  8873	
  8874		if (!IS_ENABLED(CONFIG_PREEMPT_COUNT))
  8875			return;
  8876	
  8877		if (preempt_count() > preempt_offset)
  8878			return;
  8879	
  8880		if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
  8881			return;
  8882		prev_jiffy = jiffies;
  8883	
  8884		printk(KERN_ERR "BUG: assuming atomic context at %s:%d\n", file, line);
  8885		printk(KERN_ERR "in_atomic(): %d, irqs_disabled(): %d, pid: %d, name: %s\n",
  8886				in_atomic(), irqs_disabled(),
  8887				current->pid, current->comm);
  8888	
  8889		debug_show_held_locks(current);
  8890		dump_stack();
  8891		add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
  8892	}
  8893	EXPORT_SYMBOL_GPL(__cant_sleep);
  8894	

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

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

* [boqun:rust-sync 12/17] kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
@ 2026-02-06  3:28 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-02-06  3:28 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: oe-kbuild-all, Boqun Feng, Lyude Paul

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync
head:   3ef437b5dd8b13bd88b1512531391ad30c26d539
commit: 6969095afa2073e65ecc958bb5064ddf808309b3 [12/17] preempt: Introduce HARDIRQ_DISABLE_BITS and PREEMPT_LONG
config: sparc-randconfig-002-20260206 (https://download.01.org/0day-ci/archive/20260206/202602061130.vvWbm7SS-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260206/202602061130.vvWbm7SS-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/202602061130.vvWbm7SS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
    8867 | void __cant_sleep(const char *file, int line, long preempt_offset)
         |      ^~~~~~~~~~~~
   In file included from include/linux/random.h:7,
                    from include/linux/nodemask.h:94,
                    from include/linux/numa.h:6,
                    from include/linux/cpumask.h:15,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/sched.h:37,
                    from kernel/sched/core.c:11:
   include/linux/kernel.h:78:13: note: previous declaration of '__cant_sleep' with type 'void(const char *, int,  int)'
      78 | extern void __cant_sleep(const char *file, int line, int preempt_offset);
         |             ^~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/asm-generic/bug.h:31,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/sched.h:12:
   kernel/sched/core.c:8893:19: error: conflicting types for '__cant_sleep'; have 'void(const char *, int,  long int)'
    8893 | EXPORT_SYMBOL_GPL(__cant_sleep);
         |                   ^~~~~~~~~~~~
   include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
      76 |         extern typeof(sym) sym;                                 \
         |                            ^~~
   include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
      90 | #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
         |                                         ^~~~~~~~~~~~~~
   kernel/sched/core.c:8893:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    8893 | EXPORT_SYMBOL_GPL(__cant_sleep);
         | ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:78:13: note: previous declaration of '__cant_sleep' with type 'void(const char *, int,  int)'
      78 | extern void __cant_sleep(const char *file, int line, int preempt_offset);
         |             ^~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for CAN_DEV
   Depends on [n]: NETDEVICES [=n] && CAN [=y]
   Selected by [y]:
   - CAN [=y] && NET [=y]


vim +8867 kernel/sched/core.c

  8866	
> 8867	void __cant_sleep(const char *file, int line, long preempt_offset)
  8868	{
  8869		static unsigned long prev_jiffy;
  8870	
  8871		if (irqs_disabled())
  8872			return;
  8873	
  8874		if (!IS_ENABLED(CONFIG_PREEMPT_COUNT))
  8875			return;
  8876	
  8877		if (preempt_count() > preempt_offset)
  8878			return;
  8879	
  8880		if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
  8881			return;
  8882		prev_jiffy = jiffies;
  8883	
  8884		printk(KERN_ERR "BUG: assuming atomic context at %s:%d\n", file, line);
  8885		printk(KERN_ERR "in_atomic(): %d, irqs_disabled(): %d, pid: %d, name: %s\n",
  8886				in_atomic(), irqs_disabled(),
  8887				current->pid, current->comm);
  8888	
  8889		debug_show_held_locks(current);
  8890		dump_stack();
  8891		add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
  8892	}
  8893	EXPORT_SYMBOL_GPL(__cant_sleep);
  8894	

-- 
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:[~2026-02-06  3:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06  3:28 [boqun:rust-sync 12/17] kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int, long int)' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-02-06  3:13 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.