From patchwork Wed Jul 1 14:10:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 11636529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E623C13B6 for ; Wed, 1 Jul 2020 14:11:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 BFF9D20702 for ; Wed, 1 Jul 2020 14:11:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CpZR0ck1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFF9D20702 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=distanz.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vq1e/mSxUJwrynctVES3iA1LWjpa2g6TRJbRzWqdAOQ=; b=CpZR0ck1NZqhMJqWdtgE9b3Qj dou20lDByAEzaFIKrLAOHT7P0oUFPwH1AeoMr62b6/6PgfgZTg/u+8DxlE8mj353qgx/FhnOF9XiL QiKVNM4phlxWjBmLngriANu2PFOzwOf8fGKKFbh17bVbDAJzqD7PUqapLID47tR1SkNSMLFlr/2YA LbJN/QVCBfBX8OLYawr0kfM2GEVxW2op5Go68WzDZKLWF1ddiBYTJCY9sUZ1L+nOzi/vx8ZqaVyhe t/UlgCNyOeTUgh/RwNwaXpz0MfStlgLsCfpD9kg1E8Q6ysTw4AMiaUZzLWmqHbRx4kU/c/ZkTDTLC ykST2yajw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqdRN-00078F-5i; Wed, 01 Jul 2020 14:10:21 +0000 Received: from sym2.noone.org ([2a01:4f8:120:4161::3]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqdRL-00077Y-7M for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2020 14:10:20 +0000 Received: by sym2.noone.org (Postfix, from userid 1002) id 49xjmV0ZnNzvjc1; Wed, 1 Jul 2020 16:10:17 +0200 (CEST) From: Tobias Klauser To: Anurag Kumar Vulisha , Laurent Pinchart Subject: [PATCH v2] phy: zynqmp: Fix unused-function compiler warning Date: Wed, 1 Jul 2020 16:10:17 +0200 Message-Id: <20200701141017.26931-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200701090438.21224-1-tklauser@distanz.ch> References: <20200701090438.21224-1-tklauser@distanz.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_101019_423018_2330607D X-CRM114-Status: GOOD ( 11.32 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Vinod Koul , Michal Simek , linux-arm-kernel@lists.infradead.org, Kishon Vijay Abraham I Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Mark xpsgtr_suspend and xpsgtr_resume as __maybe_unused to fix the following compiler warning when building with !CONFIG_PM_SLEEP: drivers/phy/xilinx/phy-zynqmp.c:830:12: warning: ‘xpsgtr_resume’ defined but not used [-Wunused-function] 830 | static int xpsgtr_resume(struct device *dev) | ^~~~~~~~~~~~~ drivers/phy/xilinx/phy-zynqmp.c:819:12: warning: ‘xpsgtr_suspend’ defined but not used [-Wunused-function] 819 | static int xpsgtr_suspend(struct device *dev) | ^~~~~~~~~~~~~~ Also drop the existing #ifdef CONFIG_PM so the functions are always compile-checked regardless of CONFIG_PM and/or CONFIG_PM_SLEEP being set. Reviewed-by: Laurent Pinchart Signed-off-by: Tobias Klauser --- drivers/phy/xilinx/phy-zynqmp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/xilinx/phy-zynqmp.c b/drivers/phy/xilinx/phy-zynqmp.c index 8babee2ce9ec..2b0f921b6ee3 100644 --- a/drivers/phy/xilinx/phy-zynqmp.c +++ b/drivers/phy/xilinx/phy-zynqmp.c @@ -815,8 +815,7 @@ static struct phy *xpsgtr_xlate(struct device *dev, * Power Management */ -#ifdef CONFIG_PM -static int xpsgtr_suspend(struct device *dev) +static int __maybe_unused xpsgtr_suspend(struct device *dev) { struct xpsgtr_dev *gtr_dev = dev_get_drvdata(dev); @@ -827,7 +826,7 @@ static int xpsgtr_suspend(struct device *dev) return 0; } -static int xpsgtr_resume(struct device *dev) +static int __maybe_unused xpsgtr_resume(struct device *dev) { struct xpsgtr_dev *gtr_dev = dev_get_drvdata(dev); unsigned int icm_cfg0, icm_cfg1; @@ -854,7 +853,6 @@ static int xpsgtr_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ static const struct dev_pm_ops xpsgtr_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(xpsgtr_suspend, xpsgtr_resume)