From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev, Boqun Feng <boqun@kernel.org>,
Lyude Paul <lyude@redhat.com>
Subject: [boqun:rust-sync 12/17] kernel/sched/core.c:8867:6: error: conflicting types for '__cant_sleep'; have 'void(const char *, int, long int)'
Date: Fri, 06 Feb 2026 11:28:15 +0800 [thread overview]
Message-ID: <202602061130.vvWbm7SS-lkp@intel.com> (raw)
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
next reply other threads:[~2026-02-06 3:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 3:28 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-02-06 3:13 [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
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=202602061130.vvWbm7SS-lkp@intel.com \
--to=lkp@intel.com \
--cc=boqun@kernel.org \
--cc=lyude@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
/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.