From patchwork Sun Jul 24 10:13:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ren Zhijie X-Patchwork-Id: 12927504 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 99FF3C433EF for ; Sun, 24 Jul 2022 10:17:37 +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=mSZN9AifrbR1QFzW2wxVjzz1GWgmphGkrpe0Ymco+OQ=; b=K8gqwgq8zt69/F e8G8Z352ojiEb58W5yIwm/0S13DSjwRR9YElZPi14gYgiF031+2IGukd/qZYS5uNKJNqMye9DAhY6 UbM4JxGb7lStv41QtcM2Y2VjsIHKL/PtMbq3oLg85pqYVUEPx5lHsKLgp/HqJtsKafykJnJUsevET 32EkQEeOQYKW8XT9gMzNRbXW6q26tdgTGwwTZJTXQtSr/B4V7iM8TvNsdkiRzngNpy7sLxJFd1JwA Cvo/sgzQnDZaJNb6k68Oyycf3NPzqQNKKBb4pdxq3SJ7Y7bE/gJHbfAF6WHKVx1AWZNlO4LQFUpDL wKi5qP/HtSzCenZQmwFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFYet-004Gs7-Rq; Sun, 24 Jul 2022 10:16:23 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFYeq-004GhI-0X for linux-arm-kernel@lists.infradead.org; Sun, 24 Jul 2022 10:16:22 +0000 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LrJsr6BWnzkWR3; Sun, 24 Jul 2022 18:13:36 +0800 (CST) Received: from dggpeml500008.china.huawei.com (7.185.36.147) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 24 Jul 2022 18:16:05 +0800 Received: from huawei.com (10.67.175.34) by dggpeml500008.china.huawei.com (7.185.36.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 24 Jul 2022 18:16:04 +0800 From: Ren Zhijie To: , , , , , CC: , , , Ren Zhijie Subject: [PATCH -next] PCI: imx6: Fix build error unused-function Date: Sun, 24 Jul 2022 18:13:53 +0800 Message-ID: <20220724101353.127875-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: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500008.china.huawei.com (7.185.36.147) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_031620_271568_45F36EBA X-CRM114-Status: GOOD ( 10.02 ) 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_PM_SLEEP is not set, make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like this: drivers/pci/controller/dwc/pci-imx6.c:973:13: error: ‘imx6_pcie_host_exit’ defined but not used [-Werror=unused-function] static void imx6_pcie_host_exit(struct dw_pcie_rp *pp) ^~~~~~~~~~~~~~~~~~~ drivers/pci/controller/dwc/pci-imx6.c:904:13: error: ‘imx6_pcie_stop_link’ defined but not used [-Werror=unused-function] static void imx6_pcie_stop_link(struct dw_pcie *pci) ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[4]: *** [drivers/pci/controller/dwc/pci-imx6.o] Error 1 These two functions imx6_pcie_host_exit() and imx6_pcie_stop_link() only be called by imx6_pcie_suspend_noirq(), which was warpped by CONFIG_PM_SLEEP. To fix build error unused-function, use __maybe_unused to attach them. Fixes: 25ae5434c3de ("PCI: imx6: Reformat suspend callback to keep symmetric with resume") Signed-off-by: Ren Zhijie --- drivers/pci/controller/dwc/pci-imx6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 55e109d1ab27..533f5ef68e94 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -901,7 +901,7 @@ static int imx6_pcie_start_link(struct dw_pcie *pci) return 0; } -static void imx6_pcie_stop_link(struct dw_pcie *pci) +static void __maybe_unused imx6_pcie_stop_link(struct dw_pcie *pci) { struct device *dev = pci->dev; @@ -970,7 +970,7 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp) return ret; } -static void imx6_pcie_host_exit(struct dw_pcie_rp *pp) +static void __maybe_unused imx6_pcie_host_exit(struct dw_pcie_rp *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);