Skip to content

Commit 8ac6e61

Browse files
Liao Changpalmer-dabbelt
authored andcommitted
riscv: Add header include guards to insn.h
Add header include guards to insn.h to prevent repeating declaration of any identifiers in insn.h. Fixes: edde558 ("riscv: Add SW single-step support for KDB") Signed-off-by: Liao Chang <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Fixes: c9c1af3 ("RISC-V: rename parse_asm.h to insn.h") Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent b19aa28 commit 8ac6e61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/riscv/include/asm/insn.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Copyright (C) 2020 SiFive
44
*/
55

6+
#ifndef _ASM_RISCV_INSN_H
7+
#define _ASM_RISCV_INSN_H
8+
69
#include <linux/bits.h>
710

811
#define RV_INSN_FUNCT3_MASK GENMASK(14, 12)
@@ -375,3 +378,4 @@ static inline void riscv_insn_insert_utype_itype_imm(u32 *utype_insn, u32 *itype
375378
*utype_insn |= (imm & RV_U_IMM_31_12_MASK) + ((imm & BIT(11)) << 1);
376379
*itype_insn |= ((imm & RV_I_IMM_11_0_MASK) << RV_I_IMM_11_0_OPOFF);
377380
}
381+
#endif /* _ASM_RISCV_INSN_H */

0 commit comments

Comments
 (0)