[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230129094242.282620-1-liaochang1@huawei.com>
Date: Sun, 29 Jan 2023 17:42:42 +0800
From: Liao Chang <liaochang1@...wei.com>
To: <paul.walmsley@...ive.com>, <palmer@...belt.com>,
<aou@...s.berkeley.edu>, <heiko.stuebner@...ll.eu>,
<ajones@...tanamicro.com>,
<prabhakar.mahadev-lad.rj@...renesas.com>,
<conor.dooley@...rochip.com>, <jszhang@...nel.org>,
<liaochang1@...wei.com>, <vincent.chen@...ive.com>
CC: <linux-riscv@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] 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: edde5584c7ab ("riscv: Add SW single-step support for KDB")
Signed-off-by: Liao Chang <liaochang1@...wei.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
Powered by blists - more mailing lists