From: Seung-Woo Kim Date: Wed, 3 May 2023 06:59:07 +0000 (+0900) Subject: sched/core: fix build warning without CONFIG_CPUMASK_OFFSTACK X-Git-Tag: accepted/tizen/unified/20230531.034423~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65db1dbb024c25be0bfaddafef5e699e21d1c331;p=platform%2Fkernel%2Flinux-amlogic.git sched/core: fix build warning without CONFIG_CPUMASK_OFFSTACK Without CONFIG_CPUMASK_OFFSTACK, checking the address of the cpumask_var_t gives warning. To resolve the warning, use cpumask_available() instead of checking the pointer directly. Change-Id: I00b5a90015a304a4b1151afd1074acf9c542cb55 Ref: commit e78c59fda86c ("cpumask: Add helper cpumask_available()") Signed-off-by: Seung-Woo Kim --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index caac2f57a38c..eb7fe7ac4c59 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -8267,7 +8267,7 @@ void __init sched_init(void) #ifdef CONFIG_SMP zalloc_cpumask_var(&sched_domains_tmpmask, GFP_NOWAIT); /* May be allocated at isolcpus cmdline parse time */ - if (cpu_isolated_map == NULL) + if (!cpumask_available(cpu_isolated_map)) zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT); idle_thread_set_boot_cpu(); set_cpu_rq_start_time(smp_processor_id());