public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Add header include guards to insn.h
@ 2023-01-29  9:42 Liao Chang
  2023-01-30  7:35 ` Andrew Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Liao Chang @ 2023-01-29  9:42 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, heiko.stuebner, ajones,
	prabhakar.mahadev-lad.rj, conor.dooley, jszhang, liaochang1,
	vincent.chen
  Cc: linux-riscv, linux-kernel

Add header include guards to insn.h to prevent repeating declaration of
any identifiers in insn.h.

Fixes: edde5584c7ab ("riscv: Add SW single-step support for KDB")
Signed-off-by: Liao Chang <liaochang1@huawei.com>
---
 arch/riscv/include/asm/insn.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/include/asm/insn.h b/arch/riscv/include/asm/insn.h
index 25ef9c0b19e7..22c7613bfda3 100644
--- a/arch/riscv/include/asm/insn.h
+++ b/arch/riscv/include/asm/insn.h
@@ -3,6 +3,9 @@
  * Copyright (C) 2020 SiFive
  */
 
+#ifndef _ASM_RISCV_INSN_H
+#define _ASM_RISCV_INSN_H
+
 #include <linux/bits.h>
 
 #define RV_INSN_FUNCT3_MASK	GENMASK(14, 12)
@@ -365,3 +368,4 @@ static inline void riscv_insn_insert_utype_itype_imm(u32 *utype_insn, u32 *itype
 	*utype_insn |= (imm & RV_U_IMM_31_12_MASK) + ((imm & BIT(11)) << 1);
 	*itype_insn |= ((imm & RV_I_IMM_11_0_MASK) << RV_I_IMM_11_0_OPOFF);
 }
+#endif /* _ASM_RISCV_INSN_H */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-22 15:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-29  9:42 [PATCH] riscv: Add header include guards to insn.h Liao Chang
2023-01-30  7:35 ` Andrew Jones
2023-01-30 14:53 ` Conor Dooley
2023-02-01  9:37   ` liaochang (A)
2023-02-01  9:42     ` Conor Dooley
2023-02-02  0:52       ` liaochang (A)
2023-02-02  3:33         ` Joe Perches
2023-02-02 11:36           ` liaochang (A)
2023-02-22 15:00 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox