Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353659pxb; Mon, 20 Sep 2021 19:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBTf2nEnq6Fycabsnkre6jV18EiFo0wV9RtrvdpgqG/69yLwMA2aRe6Rgf6C9Zj/XzlwIa X-Received: by 2002:a5d:80d7:: with SMTP id h23mr1692489ior.68.1632192734596; Mon, 20 Sep 2021 19:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192734; cv=none; d=google.com; s=arc-20160816; b=PRao3m9GsnK67B5sANimQFdDCsKW4/t032mN/M8gI/B4oeEsctQZCYtZnzjzn11ePW MhZcF6m3d72rUI0ixRKBDHMcpMyDU+MSOSN3mzWIz4reFlq5guD/ck8xC9mvS1FE8wRv TBnhxKttft5ZzQds/IVcV5BWL40mYyG8OxPEoQ53Acuea9gYa+PAYu9Fpl247WJlnIKV UkdGp8DqRcdoES9sw0VHzbN27Xi/fIVy6EpKGnMFqehLkAsLP+YdaElHw2qrzJcA6y8b 2volfDEpWxqxMLLLZ+IdGTXoQRm5IvBa5qBrhaE/xWvS4OLpif0iG5cSv2eg7lpuieSa tjtQ== 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=LRaPQSFlyJng4wfK3UhubfJxGfBHce2OUKzYH68Z95E=; b=h2qMChW6ePkGjdcBQLWw0Euvy8iB9rNAPhOChFUrbAI3vPy+pLxwQLBHCRAGQzUKEH ry4blCM6uEf4eCvtGue99MfFkdD9RKQMuTN8GTi8wqVKMXdyydHd/kyuMNz1LRmWN5iV z/bYP/E9L0LsPk/BPB9t2pVSA1ZwsXcaolF3B9gBZXOZBwhOkUsGp2f9JNmZeuMwm4ij bSR3BDKuUGpTZ2H8W2G60On0yBVlw2CFBwQzIAoMcYpJABFZYj3XDRBm6en4VQlXbpaz jjtYmfU+zdpQt1wuSjpLXyd38eyZhuU/zRFk9CZFY42oMnATEB4EBEHYWPtczPYTbSH9 oSYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RSJSngMG; 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 67si8854342ioc.91.2021.09.20.19.52.03; Mon, 20 Sep 2021 19:52:14 -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=RSJSngMG; 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 S1383889AbhITSqM (ORCPT + 99 others); Mon, 20 Sep 2021 14:46:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382712AbhITSmR (ORCPT ); Mon, 20 Sep 2021 14:42:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B15AE61354; Mon, 20 Sep 2021 17:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159105; bh=4u+ZWAkctvO+7ZDjf8SrpXgAa0ebrQw8XJrUA3qCkh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RSJSngMGQss2sIFk59ax0OnbQv+Fx70DMSQgdfp153PtMvE0aeReNg7ITZOPocbxD AvrHhKJnFHN0EEFZGVOAE1xNISBY177azlmffnijnTwlsAssxe9sPqh4GMG6EBS/hW b04qGG7vS29TJ5vQ/jyG7C99I03e0pIE5oEKii2c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Joakim Zhang , "David S. Miller" Subject: [PATCH 5.14 079/168] net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP Date: Mon, 20 Sep 2021 18:43:37 +0200 Message-Id: <20210920163924.238014881@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@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: Joakim Zhang commit 2a48d96fd58a666ae231c3dd6fe4a458798ac645 upstream. Use __maybe_unused for noirq_suspend()/noirq_resume() hooks to avoid build warning with !CONFIG_PM_SLEEP: >> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:796:12: error: 'stmmac_pltfr_noirq_resume' defined but not used [-Werror=unused-function] 796 | static int stmmac_pltfr_noirq_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:775:12: error: 'stmmac_pltfr_noirq_suspend' defined but not used [-Werror=unused-function] 775 | static int stmmac_pltfr_noirq_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: 276aae377206 ("net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume") Reported-by: kernel test robot Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -772,7 +772,7 @@ static int __maybe_unused stmmac_runtime return stmmac_bus_clks_config(priv, true); } -static int stmmac_pltfr_noirq_suspend(struct device *dev) +static int __maybe_unused stmmac_pltfr_noirq_suspend(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct stmmac_priv *priv = netdev_priv(ndev); @@ -793,7 +793,7 @@ static int stmmac_pltfr_noirq_suspend(st return 0; } -static int stmmac_pltfr_noirq_resume(struct device *dev) +static int __maybe_unused stmmac_pltfr_noirq_resume(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct stmmac_priv *priv = netdev_priv(ndev);