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 <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Ghiti <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
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)