Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp660197ybt; Wed, 1 Jul 2020 07:13:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8eaPCIi4H+JnZRPvWqA+ZP/NiCT6PXIw+W8NR2nXTkRIuY6h1pWVnBehQc8NvrHuz9M4b X-Received: by 2002:a05:6402:1805:: with SMTP id g5mr20062987edy.357.1593612807676; Wed, 01 Jul 2020 07:13:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593612807; cv=none; d=google.com; s=arc-20160816; b=tWn3GqQRhjirWlxC3k38CbZ/P9FZF4LkdmD7BHwYYGFM5h6+WJrPl4zdi+nCyc1GtP jlgsEGdFZNnLgBElQ5suO5L1Kqq4VuLz8S4tGHaehbd52tzMhzHWLITkxIho1Pf14jun nPX1NquYVq9KjIxG5hiTIh0c9+m9Imb0sxs2IPcFGnr/VZVZamLavzHANo1rv5Wrn2qJ 0JpjxAQe6P0UM1vDygSoXZ23w2ipqvyl5+ZZB7wU4VR9N7eRWDKtqR6Ls/4pPIndMqZ6 jE06a2CCemwj/trP9hpxC9c3I6Gh7iTmwgfUYz5wIbF3KIuT/mBEWGD7J4SdyCg/xO7u kVZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HepaAw59uieSUCywV+gE9rtxkf//6ZwJrT/f2T6x9Ac=; b=wN+dWocMrayPT5ZWr/YIKx4jEKvXlV5q1e5TPv/IAY8S8ZTyKXJV/rO+aPa4ii4DWU kiXIlH4HielI8BcmSpBl6GlpQ7ADVj/2jn7aH1R16EcdEawB10b+RMAZ6aYJVMAarfYG vHyiJMpc3knJaGczB+jx2jdAM/VIH0ejxem8ePaMwicPit/WKTBQnt7iY5qRXrRGPWPW kkIJDRiyxw0zbLUpDg3sslU6QVES/EPZGWHv+IjVZ2aYa1A7rai5nz47ozcJtbUsr8SD Y0wrmDAFEWoW56vHymTo+sS+7GN6OSnWWKdXGJAET3W+2a2vS0SNpOtISB3D/m8XTJb+ tKUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf11si4091823ejb.475.2020.07.01.07.13.03; Wed, 01 Jul 2020 07:13:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731344AbgGAOKT (ORCPT + 99 others); Wed, 1 Jul 2020 10:10:19 -0400 Received: from sym2.noone.org ([178.63.92.236]:34644 "EHLO sym2.noone.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbgGAOKT (ORCPT ); Wed, 1 Jul 2020 10:10:19 -0400 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 Cc: Kishon Vijay Abraham I , Vinod Koul , Michal Simek , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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) -- 2.27.0