From patchwork Mon Mar 15 13:52:27 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: 400448 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3447425jai; Mon, 15 Mar 2021 07:03:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJs2N5mdZ6xkqiuMJyVheC4ZbTIc/cstWpIq8nnS9mlcv62cilDszmjKMQMkmHbooxsL2o X-Received: by 2002:a17:906:70d:: with SMTP id y13mr12982592ejb.170.1615817020896; Mon, 15 Mar 2021 07:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817020; cv=none; d=google.com; s=arc-20160816; b=ZISs91JguBNo2sb6hFCfbwR85gZ47Z7QD7HbcFkXTc0hRfbfTJm0MXygmBGicFi8TH aKkUOQ1sKVGA2yYwX6AS0m7RjCQXdqI/1nkLehHFBHc8uu9Iethpt+SPxV+BSm4aro/Z 2U4qC5sBZ9CUbILnGABXeRBL7nOPepgzxtvFH+A38JVykGubpEXpyZrLMYnZAtUB70/A K1mc2UmxXoPp7fL7+KO8h/3yFAZ81FUqt1egwS4KxvGkhwPQQH/9MKBYzwYNu3rC375v uoQOYyC5OQCuJ2/QkURM8u5f6z0l3s53FCnH3D/TdbUxdt54E+0f9HS3cO0vMgwlYPjE 4CoQ== 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=raUR/NSdIznwtbwaLD1QUBvGAPUY6eLDVKFpxyWlcnprjPC2TJZNs4tcUQ0CT6s4Gk 4l6tzJLWJ/v5Jy+Q81tfMwCOkQNuQiA9RwjTTkzB4NJ8Q/v4Z2F2cgSpAmidMsFq1W1D zQ3oxj8YqSS41LxcJPsTvfKWdLe1yHnXwFUHR84ECiTTu1d5D3mEqcrw0jL52bgq9pqf l6ZTkdx+lIUQGHHrjwzNc8MwEqTM2VFsPqP3RxsZqRRBTtlUgThxbyTDhuADSlj399vH QWHbsO1GuULwD4qEmYzvoaAor3DqaEBpcJaI0V0LVMt+EbHt+sb9HVOIz3g5WMJ/MwmF ZjdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=maB2mYVa; 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.03.40; Mon, 15 Mar 2021 07:03:40 -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=maB2mYVa; 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 S231741AbhCOOAc (ORCPT + 12 others); Mon, 15 Mar 2021 10:00:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:35610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232475AbhCON66 (ORCPT ); Mon, 15 Mar 2021 09:58:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD21F64F46; Mon, 15 Mar 2021 13:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816719; bh=+ptmoKpV4hlB21msSzO9E3KSI8JK5/TGAUnVA56A/VI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=maB2mYVaf17f2k8Otaqxnfr4GBAimshdWxTjNuWRKNPuManisIw6lZp7N3FTV2p0i 6UgKhP5iW2p8trCa7Q0HA8CTaJEfSAt198lFmNloNnYua82CcOchqh6MELim+e68FF LztDi+OCDQF8kZC704oOvcCxF0H0AurR6GAQ/M98= 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.11 084/306] net: phy: make mdio_bus_phy_suspend/resume as __maybe_unused Date: Mon, 15 Mar 2021 14:52:27 +0100 Message-Id: <20210315135510.491807314@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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