Skip to content

Commit d7e0cce

Browse files
seehearfeelpalmer-dabbelt
authored andcommitted
riscv: Make regs_irqs_disabled() more clear
The return value of regs_irqs_disabled() is true or false, so change its type to reflect that and also make it always inline. Suggested-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20250422113156.25742-1-yangtiezhu@loongson.cn Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
1 parent 4d63192 commit d7e0cce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/include/asm/ptrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static inline unsigned long regs_get_kernel_argument(struct pt_regs *regs,
175175
return 0;
176176
}
177177

178-
static inline int regs_irqs_disabled(struct pt_regs *regs)
178+
static __always_inline bool regs_irqs_disabled(struct pt_regs *regs)
179179
{
180180
return !(regs->status & SR_PIE);
181181
}

0 commit comments

Comments
 (0)