From patchwork Tue Sep 1 07:07:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 295601 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=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 753EBC433E6 for ; Tue, 1 Sep 2020 07:08:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D3F6204EC for ; Tue, 1 Sep 2020 07:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726044AbgIAHIc (ORCPT ); Tue, 1 Sep 2020 03:08:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10744 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726006AbgIAHIc (ORCPT ); Tue, 1 Sep 2020 03:08:32 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 20D41AA7CFA4EA010863; Tue, 1 Sep 2020 15:08:30 +0800 (CST) Received: from localhost (10.174.179.108) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Tue, 1 Sep 2020 15:08:23 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH -next] memory: omap-gpmc: Fix -Wunused-function warnings Date: Tue, 1 Sep 2020 15:07:53 +0800 Message-ID: <20200901070753.24328-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20200901035642.22772-1-yuehaibing@huawei.com> References: <20200901035642.22772-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.179.108] X-CFilter-Loop: Reflected Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org drivers/memory/omap-gpmc.c:987:12: warning: ‘gpmc_cs_remap’ defined but not used [-Wunused-function] static int gpmc_cs_remap(int cs, u32 base) ^~~~~~~~~~~~~ drivers/memory/omap-gpmc.c:926:20: warning: ‘gpmc_cs_get_name’ defined but not used [-Wunused-function] static const char *gpmc_cs_get_name(int cs) ^~~~~~~~~~~~~~~~ drivers/memory/omap-gpmc.c:919:13: warning: ‘gpmc_cs_set_name’ defined but not used [-Wunused-function] static void gpmc_cs_set_name(int cs, const char *name) ^~~~~~~~~~~~~~~~ Make them as __maybe_unused to fix this. Signed-off-by: YueHaibing --- drivers/memory/omap-gpmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index ac0f577a51a1..24372254986e 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -916,14 +916,14 @@ static bool gpmc_cs_reserved(int cs) return gpmc->flags & GPMC_CS_RESERVED; } -static void gpmc_cs_set_name(int cs, const char *name) +static void __maybe_unused gpmc_cs_set_name(int cs, const char *name) { struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; gpmc->name = name; } -static const char *gpmc_cs_get_name(int cs) +static const __maybe_unused char *gpmc_cs_get_name(int cs) { struct gpmc_cs_data *gpmc = &gpmc_cs[cs]; @@ -984,7 +984,7 @@ static int gpmc_cs_delete_mem(int cs) * "base". Returns 0 on success and appropriate negative error code * on failure. */ -static int gpmc_cs_remap(int cs, u32 base) +static int __maybe_unused gpmc_cs_remap(int cs, u32 base) { int ret; u32 old_base, size;