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: 25288 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3152095wrr; Wed, 23 Nov 2022 18:39:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf73ZmSQTXsW2GLKCNKTLr8ZkMVCA5ZvkMwYJURYiC3UT3td38p7/rx1mZRe8DpM3kyW4jI5 X-Received: by 2002:a05:6a00:1c8d:b0:56c:f87e:c662 with SMTP id y13-20020a056a001c8d00b0056cf87ec662mr12214749pfw.65.1669257589283; Wed, 23 Nov 2022 18:39:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669257589; cv=none; d=google.com; s=arc-20160816; b=A+vx+5NsWSdsocY63Yep4iHO5WlTzPMQIhbcGXnln2OF/ywG7mGKlJzWxT3V39bAEt EaLQC69BoVAnpKemQT5GvXRdrSQrkRBa/+tMsvcv2pKw5GX79jOoguHI7cPYfPa+Pa6m K8fh6I29dV9WnTVZP3h+nL8IO/SPv4cnIuWtQ6McMajUgMn17sXiPJHBsT4hKSKnb019 PLxIEXQD5/8GWCUHjhgmKb+66JU0ybRJpjWIDYcxzgTn1H43vnf/oLjy6Z8KQc4MlfuP JNKPLfTX44jna8pM26M1JBOshRpRHhZlS9aipRmWjf6q1TZTfMtiGuF/C4uixcmDgshT Ummg== 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=CtyT/WghKjriDD/NplLnrDy63CiAGS/aK+jMsllF6q0=; b=U4uzZrlHaKW2DrTWjbMnSAdALse0MSzcFJ/KhQ/gdj/BZXbU0zGCJwdNtOFxIy+KB7 aFATI3XZ41rz/AxcXYUJRqBAOzM4fpy9GT40pUgXw24sxnSI4tO9OEVKTpCxKOxrLz4t a+Rsh9s6hpp0goRBexzdXAfURyo9UBsn1r1iFU0xA45YkEVkbRvUP7ozd16DH/09HRdG ethZN6VH1agms7BO97+jHJ+ccKDNIfahfOLqFyk4HJqBo76/rzSogZTsRTwcKxVu1MR0 7VqmobfZBVCyGAcpRWdnsF2hJo9XQ03VtVjF5D1x3UQTa4Af1boslWeIRmVR1DpNFYVl W+Vg== 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 q10-20020a170902edca00b00186897fb90dsi16513126plk.233.2022.11.23.18.39.36; Wed, 23 Nov 2022 18:39:49 -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 S229760AbiKXC3D (ORCPT + 99 others); Wed, 23 Nov 2022 21:29:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiKXC3B (ORCPT ); Wed, 23 Nov 2022 21:29:01 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1548C2ED75 for ; Wed, 23 Nov 2022 18:29:01 -0800 (PST) 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-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?1750166101213304930?= X-GMAIL-MSGID: =?utf-8?q?1750343446258310960?= 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;