From patchwork Mon Mar 15 13:52:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 400454 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3457367jai; Mon, 15 Mar 2021 07:12:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/GigGpU8dcs+6PSqq6lxgKb6GdvTHgMyHo3erPfgX6inUoyv0Fpr88i+Oa8o0qwBfzLt7 X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr23482762ejs.81.1615817436283; Mon, 15 Mar 2021 07:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817436; cv=none; d=google.com; s=arc-20160816; b=PDPEPaHQCZ1s8uy04NXm7dUZRnDJIszkQ03YVMv36XGFpjnvGxyj7/TSpnCXrad2nh tRvofcGCRyT0w+X9Z93siw/j5ujv9PXlJJ0vgyOVUHNnLPGFbVlqDas8RXrxfoSPG5al DJx/2traHoa2Ds2B46i/xohXzeeRW8YZhgHDTjL84sKvG/sM/OEE6NoOkcPr4bci2A+u mupVMs4YrHa0IfBAI/bBE6kN0NV6UNBdhMONw7UyrR7+o3VyuJn7OvDfln0f1BCQt6Bh tMYBueJmSzqRYa06Ctams5t70M1fR4So2q62iWNYk7BV326EGCYZw/Ekfsz8EXRJdckt BFZA== 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=ovWcWyaDt9EILkSwcPR8Xh9/Bgl60acBBeBuyMmIg6Bj7D7kuorKzAd0ifQ6vMWl2k cNZKogz7Q09SSn4K8QgdjNg6jjpvtIrCtU8SvayKyqEiDQxljvIWJeSjLetIDHkbffTg BIImOUxsF5YNEQ9ZwmOStEQpYS2OV3TXv1e8skH/m4BFVvkr40j6X7M6YsN3esgGe1a7 9RVKhOiU0kcLTpEuYmNX+x//Sz9g8qFHWmENFToJdCIDJKOK3/1bTcwBo4d46zEyidIA G8OqDYlJXK2gRXYQatzKeqgUoGM+v+KBGda7e/pkET8B1zsKJDJ+OmR7niDEMbeKn+Or 0D1g== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 h21si993553ede.37.2021.03.15.07.10.36; Mon, 15 Mar 2021 07:10:36 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S234727AbhCOOE6 (ORCPT + 12 others); Mon, 15 Mar 2021 10:04:58 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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