From patchwork Fri Mar 5 11:33:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nanyong Sun X-Patchwork-Id: 12118335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE257C433DB for ; Fri, 5 Mar 2021 11:05:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E17565015 for ; Fri, 5 Mar 2021 11:05:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E17565015 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vnwteNksE+cPcTt3OntR+teUOKBLwq6yedE6SytB/M4=; b=OAoivFowhIXjmQ32xscwhN55O 1kpeEsVt8/S4GiscL7tmT7wuL23/9NuCAtl1itKo1PuFhnVNe08bxxyABMmO1Van6tELQHLGCvXA4 Xbizx0dquFKGd+an7xvFrYyXZoCKz6iiTx2LwDWytyGFbvJ+D32xHbqsO53zR/SgsvaeHz6fhC4f/ jg+srO8zb76nH0VU+Cwm8/SvuZ+kY0Kj3OauWy5lHRQ7sylQFDtVy+jaX4G3NE24uS6/DbFnpLnet bKeT/4XxHfVBDVySNXU8lJGJ9a0chAyQR6OCLmsEferSUx6bfVKGV5dr9SyRZ7FOvljnlIjdVtUFP LEEE1R04A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI8GB-00EgPi-4I; Fri, 05 Mar 2021 11:04:43 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lI8F4-00EfoH-Tq for linux-riscv@lists.infradead.org; Fri, 05 Mar 2021 11:03:43 +0000 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DsPt94q38zjV5X; Fri, 5 Mar 2021 19:01:05 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Fri, 5 Mar 2021 19:02:41 +0800 From: Nanyong Sun To: , , CC: , , , , , Subject: [PATCH 1/9] riscv: traps: Fix no prototype warnings Date: Fri, 5 Mar 2021 19:33:24 +0800 Message-ID: <20210305113332.428048-2-sunnanyong@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com> References: <20210305113332.428048-1-sunnanyong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210305_110338_908035_1425117F X-CRM114-Status: UNSURE ( 5.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Fix all W=1 compilation warnings:'no previous prototype for' in arch/riscv/kernel/traps.c: arch/riscv/kernel/traps.c:96:15: warning: no previous prototype for ‘do_trap_unknown’ [-Wmissing-prototypes] 96 | DO_ERROR_INFO(do_trap_unknown, | ^~~~~~~~~~~~~~~ arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’ 91 | asmlinkage __visible void name(struct pt_regs *regs) \ | ^~~~ arch/riscv/kernel/traps.c:98:15: warning: no previous prototype for ‘do_trap_insn_misaligned’ [-Wmissing-prototypes] 98 | DO_ERROR_INFO(do_trap_insn_misaligned, | ^~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’ 91 | asmlinkage __visible void name(struct pt_regs *regs) \ | ^~~~ arch/riscv/kernel/traps.c:100:15: warning: no previous prototype for ‘do_trap_insn_fault’ [-Wmissing-prototypes] ... Reported-by: Hulk Robot Signed-off-by: Nanyong Sun --- arch/riscv/include/asm/asm-prototypes.h | 16 ++++++++++++++++ arch/riscv/kernel/traps.c | 1 + 2 files changed, 17 insertions(+) diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h index 27e005fca584..6d81abf5d9f8 100644 --- a/arch/riscv/include/asm/asm-prototypes.h +++ b/arch/riscv/include/asm/asm-prototypes.h @@ -9,4 +9,20 @@ long long __lshrti3(long long a, int b); long long __ashrti3(long long a, int b); long long __ashlti3(long long a, int b); + +#define DECLARE_DO_ERROR_INFO(name) asmlinkage void name(struct pt_regs *regs); + +DECLARE_DO_ERROR_INFO(do_trap_unknown) +DECLARE_DO_ERROR_INFO(do_trap_insn_misaligned) +DECLARE_DO_ERROR_INFO(do_trap_insn_fault) +DECLARE_DO_ERROR_INFO(do_trap_insn_illegal) +DECLARE_DO_ERROR_INFO(do_trap_load_fault) +DECLARE_DO_ERROR_INFO(do_trap_load_misaligned) +DECLARE_DO_ERROR_INFO(do_trap_store_misaligned) +DECLARE_DO_ERROR_INFO(do_trap_store_fault) +DECLARE_DO_ERROR_INFO(do_trap_ecall_u) +DECLARE_DO_ERROR_INFO(do_trap_ecall_s) +DECLARE_DO_ERROR_INFO(do_trap_ecall_m) +DECLARE_DO_ERROR_INFO(do_trap_break) + #endif /* _ASM_RISCV_PROTOTYPES_H */ diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 3ed2c23601a0..0879b5df11b9 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include