From: Tobias Klauser Date: Mon, 17 Nov 2014 10:30:37 +0000 (+0800) Subject: nios2: Use IS_ENABLED instead of #ifdefs to check config symbols X-Git-Tag: MMI-PSA29.97-13-9~11081^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac8ab8dd95f6fae76f0742499206d29eea4604cd;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git nios2: Use IS_ENABLED instead of #ifdefs to check config symbols Make the checking for div/mul/mulx instruction config symbols easier to read by using IS_ENABLED instead of #ifdefs. Signed-off-by: Tobias Klauser Acked-by: Ley Foon Tan --- diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c index b8081c5f50a1..51d5bb90d3e5 100644 --- a/arch/nios2/kernel/cpuinfo.c +++ b/arch/nios2/kernel/cpuinfo.c @@ -73,18 +73,14 @@ void __init setup_cpuinfo(void) cpuinfo.has_mul = fcpu_has(cpu, "altr,has-mul"); cpuinfo.has_mulx = fcpu_has(cpu, "altr,has-mulx"); -#ifdef CONFIG_NIOS2_HW_DIV_SUPPORT - if (!cpuinfo.has_div) + if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div) err_cpu("DIV"); -#endif -#ifdef CONFIG_NIOS2_HW_MUL_SUPPORT - if (!cpuinfo.has_mul) + + if (IS_ENABLED(CONFIG_NIOS2_HW_MUL_SUPPORT) && !cpuinfo.has_mul) err_cpu("MUL"); -#endif -#ifdef CONFIG_NIOS2_HW_MULX_SUPPORT - if (!cpuinfo.has_mulx) + + if (IS_ENABLED(CONFIG_NIOS2_HW_MULX_SUPPORT) && !cpuinfo.has_mulx) err_cpu("MULX"); -#endif cpuinfo.tlb_num_ways = fcpu(cpu, "altr,tlb-num-ways"); if (!cpuinfo.tlb_num_ways)