From: Geert Uytterhoeven Date: Mon, 22 Nov 2021 15:53:46 +0000 (+0100) Subject: MIPS: CPC: Use bitfield helpers X-Git-Tag: v6.6.17~8406^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d348f6b92801eca5671e75e1d10b7d34738681a;p=platform%2Fkernel%2Flinux-rpi.git MIPS: CPC: Use bitfield helpers Use the FIELD_PREP() helper, instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c index 8d25351..17aff13 100644 --- a/arch/mips/kernel/mips-cpc.c +++ b/arch/mips/kernel/mips-cpc.c @@ -4,6 +4,7 @@ * Author: Paul Burton */ +#include #include #include #include @@ -97,7 +98,7 @@ void mips_cpc_lock_other(unsigned int core) curr_core = cpu_core(¤t_cpu_data); spin_lock_irqsave(&per_cpu(cpc_core_lock, curr_core), per_cpu(cpc_core_lock_flags, curr_core)); - write_cpc_cl_other(core << __ffs(CPC_Cx_OTHER_CORENUM)); + write_cpc_cl_other(FIELD_PREP(CPC_Cx_OTHER_CORENUM, core)); /* * Ensure the core-other region reflects the appropriate core &