mirror of
https://github.com/torvalds/linux
synced 2024-09-20 02:57:25 +00:00
workqueue: use BUILD_BUG_ON() for compile time test instead of WARN_ON()
Any runtime WARN_ON() has to be fixed, and BUILD_BUG_ON() can help you nitice it earlier. Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
c39ba6b3a8
commit
10cdb15759
|
@ -5917,7 +5917,7 @@ void __init workqueue_init_early(void)
|
||||||
int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
|
int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
|
||||||
int i, cpu;
|
int i, cpu;
|
||||||
|
|
||||||
WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
|
BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
|
||||||
|
|
||||||
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
|
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
|
||||||
cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags));
|
cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags));
|
||||||
|
|
Loading…
Reference in a new issue