Skip to content

Commit e283187

Browse files
mmindpalmer-dabbelt
authored andcommitted
riscv: use BIT() marco for cpufeature probing
Using the appropriate BIT macro makes the code better readable. Suggested-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20220905111027.2463297-5-heiko@sntech.de Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 499590c commit e283187

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/riscv/kernel/cpufeature.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@ static u32 __init_or_module cpufeature_probe(unsigned int stage)
289289
u32 cpu_req_feature = 0;
290290

291291
if (cpufeature_probe_svpbmt(stage))
292-
cpu_req_feature |= (1U << CPUFEATURE_SVPBMT);
292+
cpu_req_feature |= BIT(CPUFEATURE_SVPBMT);
293293

294294
if (cpufeature_probe_zicbom(stage))
295-
cpu_req_feature |= (1U << CPUFEATURE_ZICBOM);
295+
cpu_req_feature |= BIT(CPUFEATURE_ZICBOM);
296296

297297
return cpu_req_feature;
298298
}

0 commit comments

Comments
 (0)