]> Git Repo - J-linux.git/commitdiff
riscv: use BIT() marco for cpufeature probing
authorHeiko Stuebner <[email protected]>
Mon, 5 Sep 2022 11:10:26 +0000 (13:10 +0200)
committerPalmer Dabbelt <[email protected]>
Thu, 13 Oct 2022 15:46:29 +0000 (08:46 -0700)
Using the appropriate BIT macro makes the code better readable.

Suggested-by: Conor Dooley <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
arch/riscv/kernel/cpufeature.c

index 729f7a218093acea8bcc973ae0c9ea1d02685894..08f7445985dc97ced2686f037b22b132123a592a 100644 (file)
@@ -289,10 +289,10 @@ static u32 __init_or_module cpufeature_probe(unsigned int stage)
        u32 cpu_req_feature = 0;
 
        if (cpufeature_probe_svpbmt(stage))
-               cpu_req_feature |= (1U << CPUFEATURE_SVPBMT);
+               cpu_req_feature |= BIT(CPUFEATURE_SVPBMT);
 
        if (cpufeature_probe_zicbom(stage))
-               cpu_req_feature |= (1U << CPUFEATURE_ZICBOM);
+               cpu_req_feature |= BIT(CPUFEATURE_ZICBOM);
 
        return cpu_req_feature;
 }
This page took 0.044753 seconds and 4 git commands to generate.