Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525042pxf; Mon, 15 Mar 2021 11:29:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVdYOUAxMW5DaFvX17snRnQjP3yfeS6AB+wz2LgNtNslgb7DrhCD9pY62k1bZ4rIKjgVKT X-Received: by 2002:a17:906:1f93:: with SMTP id t19mr25781605ejr.443.1615832971459; Mon, 15 Mar 2021 11:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832971; cv=none; d=google.com; s=arc-20160816; b=J+juaSvzezHiUWjSE9tHDrzaIeHTAFZnJLJIpsQq8p7zXFVYjBbdP1xWNUk2Sm50Gs zdQMrt2WtcQew9TVEOKTZt6p0m6Ut4vwr1jzT8TdhsXS08qKbJaVeWTfVDO1wQRwW4Aw MQtF6HuIUZXFAI5eM7oehyDkxbFxzqGM5/SA/x1qdJcbxN/r1nOxdOcvzALBz3+gbPMu X0x4wqakBtyPOwBpJhDp+oKKAySEWb1o3ubr8j+jNiv6fR23i8UDpY2Cz7W1Zj0B8+ib 3QVw0c59mLc8LIwa9kPl6iRL30K+APtJwla7CP20ZTPhB+xNf2Nim8fMtcvS9xr/gLos pCQA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CGzzx60DLa1RzA25YUHTIY2VLaA0zr1EKkA00r0rIyY=; b=QibJ2ZBf8KAlCffuGpskFDsPe8v7tX9r+UvEN9eqBbWBj+DjMvLMeMApeSL0BDF8D3 p4Q4+NZrdV5NbcEU/L46fs71l57Q7Jenu+NZ8y0D/0SV1oYDrSaeBZS7QUTmBkwm57TI VVPFG6h09uCnpLQ2ZEq5CR7ZLazLe3EyYBVmYIXjW36KDID1hIA/m0MsFtNe4TPexPbj M5/9VbAR7PvE4vKGZ/B8ovEO2d/nqfjMld4rKMwOKIw0Wp7c1PVV72WHyWbRcQFCmyAr 3S3Z2+g0KZeQoe0QXgNN2+GA3IC69rgk7v1xOiLGuUu/hAqSb/myJy12C3gzaaeVZQT6 VqIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ue5NmdQE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si11942164edz.197.2021.03.15.11.29.03; Mon, 15 Mar 2021 11:29:31 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ue5NmdQE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235144AbhCOOaM (ORCPT + 99 others); Mon, 15 Mar 2021 10:30:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:35904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232131AbhCON6n (ORCPT ); Mon, 15 Mar 2021 09:58:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FAA964F37; Mon, 15 Mar 2021 13:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816712; bh=+ptmoKpV4hlB21msSzO9E3KSI8JK5/TGAUnVA56A/VI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ue5NmdQEIzhK3+sB6qYEXQEBFHNL/ZUmo83qUVf3hUJr9v1Egi+PSjU9VUUAC3mvP tZkgjHMq44vwiNTW/0ywUrnshKeWxWza5BiRj8rq51mQWSgx7C9bPnchr21av9rnPW HEqm/hWGOX09dai6kUCA6gd+KRdjM6jxfV+koj5Y= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Andrew Lunn , Jakub Kicinski Subject: [PATCH 5.10 070/290] net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused Date: Mon, 15 Mar 2021 14:52:43 +0100 Message-Id: <20210315135544.273556234@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Arnd Bergmann commit 7f654157f0aefba04cd7f6297351c87b76b47b89 upstream. When CONFIG_PM_SLEEP is disabled, the compiler warns about unused functions: drivers/net/phy/phy_device.c:273:12: error: unused function 'mdio_bus_phy_suspend' [-Werror,-Wunused-function] static int mdio_bus_phy_suspend(struct device *dev) drivers/net/phy/phy_device.c:293:12: error: unused function 'mdio_bus_phy_resume' [-Werror,-Wunused-function] static int mdio_bus_phy_resume(struct device *dev) The logic is intentional, so just mark these two as __maybe_unused and remove the incorrect #ifdef. Fixes: 4c0d2e96ba05 ("net: phy: consider that suspend2ram may cut off PHY power") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20210225145748.404410-1-arnd@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/phy/phy_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -230,7 +230,6 @@ static struct phy_driver genphy_driver; static LIST_HEAD(phy_fixup_list); static DEFINE_MUTEX(phy_fixup_lock); -#ifdef CONFIG_PM static bool mdio_bus_phy_may_suspend(struct phy_device *phydev) { struct device_driver *drv = phydev->mdio.dev.driver; @@ -270,7 +269,7 @@ out: return !phydev->suspended; } -static int mdio_bus_phy_suspend(struct device *dev) +static __maybe_unused int mdio_bus_phy_suspend(struct device *dev) { struct phy_device *phydev = to_phy_device(dev); @@ -290,7 +289,7 @@ static int mdio_bus_phy_suspend(struct d return phy_suspend(phydev); } -static int mdio_bus_phy_resume(struct device *dev) +static __maybe_unused int mdio_bus_phy_resume(struct device *dev) { struct phy_device *phydev = to_phy_device(dev); int ret; @@ -316,7 +315,6 @@ no_resume: static SIMPLE_DEV_PM_OPS(mdio_bus_phy_pm_ops, mdio_bus_phy_suspend, mdio_bus_phy_resume); -#endif /* CONFIG_PM */ /** * phy_register_fixup - creates a new phy_fixup and adds it to the list