From patchwork Thu Nov 24 02:24:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ren Zhijie X-Patchwork-Id: 13054545 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A053C433FE for ; Thu, 24 Nov 2022 02:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=jOoWHhs5fCR8kPQ38a+Hxn74syrHzP4AS3Wchg9kAuo=; b=MeoH1cbgtOphAS WblVOIp+lvCY2xlU2g7PdIK/u+ABrfjoL27MEUCoyKaRR/9cEIHaWj9b2nu5POEcidBY+nxjayu00 11jPZSGJLEI1dpZEnFONewMQaR1GJJ5e6tJkFsrxHFmyZJtn+K5xHqQqVU+eBC2qPJW0if8aHKQDz S/VFOOzvK09s5QpFZ0RlkguX8gBgXzR3gqABBeEiUNXT7T30olIc5kYjBKqO7JV5R+ojwRbyS10Hj InW0ZqYEbxKz1807qrMVhu9sV1PJ4foi86KdRuabZKTDdJqD5Fjtz0WuxziVavAds0NSbEC/zMRaR hz4nblljJh/qxjPo0/Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oy1z9-003qtS-N8; Thu, 24 Nov 2022 02:29:07 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oy1z6-003qqN-Al for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2022 02:29:06 +0000 Received: from kwepemi500022.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NHhkM07kXzmW0w; Thu, 24 Nov 2022 10:28:26 +0800 (CST) Received: from huawei.com (10.67.175.34) by kwepemi500022.china.huawei.com (7.221.188.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 24 Nov 2022 10:28:59 +0800 From: Ren Zhijie To: , , CC: , , , Ren Zhijie Subject: [PATCH v2] arm64: armv8_deprecated: fix unused-function error Date: Thu, 24 Nov 2022 02:24:29 +0000 Message-ID: <20221124022429.19024-1-renzhijie2@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.175.34] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500022.china.huawei.com (7.221.188.64) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221123_182904_555905_B3DE4EBB X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org If CONFIG_SWP_EMULATION is not set and CONFIG_CP15_BARRIER_EMULATION is not set, aarch64-linux-gnu complained about unused-function : arch/arm64/kernel/armv8_deprecated.c:67:21: error: ‘aarch32_check_condition’ defined but not used [-Werror=unused-function] static unsigned int aarch32_check_condition(u32 opcode, u32 psr) ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors To fix this warning, modify aarch32_check_condition() with __maybe_unused. Fixes: 0c5f416219da ("arm64: armv8_deprecated: move aarch32 helper earlier") Signed-off-by: Ren Zhijie Acked-by: Mark Rutland --- Changes in v2: - modify aarch32_check_condition() with __maybe_unused. arch/arm64/kernel/armv8_deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index ed0788cf6bbb..8a9052cf3013 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -64,7 +64,7 @@ struct insn_emulation { #define ARM_OPCODE_CONDITION_UNCOND 0xf -static unsigned int aarch32_check_condition(u32 opcode, u32 psr) +static unsigned int __maybe_unused aarch32_check_condition(u32 opcode, u32 psr) { u32 cc_bits = opcode >> 28;