From patchwork Sun Jan 29 09:42:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liao Chang X-Patchwork-Id: 49955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1689242wrn; Sun, 29 Jan 2023 02:20:01 -0800 (PST) X-Google-Smtp-Source: AK7set/2k5+N4E+NLcO815sJ6OsgCjjkHEkC27N38k7POclT9IYrulqyLPleS2roHkQv4TwnwOHn X-Received: by 2002:a17:90b:4b09:b0:22c:19a6:1c07 with SMTP id lx9-20020a17090b4b0900b0022c19a61c07mr5647683pjb.16.1674987601097; Sun, 29 Jan 2023 02:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674987601; cv=none; d=google.com; s=arc-20160816; b=dloUH8jh14/Cl8M9YPZrjhHcrfBOBL3wja/IikWMLAijlvoQ5JH+5Nmt9P2gxH3SrY Gnd/kYh5WSuAvZnVGo3ZAQCpSyhsOJowSk7YJhYJJnyJex3c73aJj0wv43lXWQl+jG/p VTH81uyrTQIvi8lJK27WjQ1xBTpVQiYjsJW42U9muJhyd7oTvLPR5w65Tm+MfGUifoYz hodGnsM6a+og4B8ORxJX2VGT9Ne1GrD/MpPXV+jLrrvOMRZGakoQ51u3HTCburCOsbDV 2UxFlEnNGzdUiyB8oXld1cnNedJFUOXgRdp33/UhIjeACTxJgG34+uFbBOMCIfJdcqrU 5iSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mF4WLAYWswgvLQyWpDiRTPJx/OxN4H0WtP8sXKCD7gA=; b=GAPPflgEE5555wpTVC1PP2XgBFOb6qT7PljYbkziPVShEzAV4nFNj2o3myQH/khT+g 1S/UbDCtfrUYqCsm1iWWTmmW8pWkhKn67ygNLm1FczA7Xectdj/nq/ti/HWk/djLopeG q+qgTzCklyNOeyX66R7OLARu61U4Ca/347M2Upz760dFOom4e3zbPY/uJWB3G5AGmUOw HzGAi7tGvRuFfqnL07fdV7ytuDAFr3CLVrOTadMoziOzLFFXBpJlKp0bg02vvDE4BdCy LjxBCku+KTf9OSQMSRSDmuZD2NgpPa8iCtH0dF8zJ92SJQId6RsdY5rUhGeu9zX9o1S8 hEzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a17090a62c100b0022bf88769b8si9842158pjs.170.2023.01.29.02.19.48; Sun, 29 Jan 2023 02:20:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233855AbjA2JpI (ORCPT + 99 others); Sun, 29 Jan 2023 04:45:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjA2JpG (ORCPT ); Sun, 29 Jan 2023 04:45:06 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486C430DA for ; Sun, 29 Jan 2023 01:45:05 -0800 (PST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4P4RFP1c9lz16N2W; Sun, 29 Jan 2023 17:43:05 +0800 (CST) Received: from huawei.com (10.67.174.53) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sun, 29 Jan 2023 17:45:02 +0800 From: Liao Chang To: , , , , , , , , , CC: , Subject: [PATCH] riscv: Add header include guards to insn.h Date: Sun, 29 Jan 2023 17:42:42 +0800 Message-ID: <20230129094242.282620-1-liaochang1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.53] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756351798947306540?= X-GMAIL-MSGID: =?utf-8?q?1756351798947306540?= 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 Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley --- 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 #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 */