From patchwork Thu Oct 25 14:10:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149530 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1391655ljp; Thu, 25 Oct 2018 07:12:23 -0700 (PDT) X-Google-Smtp-Source: AJdET5fbPXDaGleRZ58Tto74xvkckEieahTdqpTANOCcR/LE5PFGdmr7QQ8n29SyhlYmyVplOA1p X-Received: by 2002:a63:7418:: with SMTP id p24mr1674625pgc.196.1540476743548; Thu, 25 Oct 2018 07:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476743; cv=none; d=google.com; s=arc-20160816; b=vc+aK8G2Xr/zLUOcCW3rzZ7OE2E5zTWiwfqo9DRmDPz7L6kaM/iTKcj0uuLeV+M229 cVnwPGg+ffEr4uCp/RC30/zs3PTlRhIF7a+UlcO1ElaRA4oD8n/OzZJ/1N2PG+n0/5yd mFilW/JW3ufmlbXYTEOcmmqrNW111sjVkwFkuAOK0J0tiYBWsvVZIJ1Pk9wV3fA7SFge Q4jey+Z3QLACkDoJs/K1Dg70YMnmjduh59p14I8rfOi2PJqT7E7YX9S0l9L6+RbqvlDD /iQejrb1exS/X4wnTXWjCVBrqHYR5RHh+8Gb6Na0MlXjfyImFOAcPZcVA14VQiHHT5xh FGVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=tMJGTDumGAA+VMq4BoFFebXnj/XHqo9sZGseiq0Az5Y=; b=EQICenyw3vMWD32XWBkWgYcGdPEcYk4UV6BJB1H6ReaTLWaVYOW8KwI4F5yFzfN9mA TPBPtunHspdT49WiZwt93gKs1N5/JCvuoXaxnuXNgS7qokjC4Euf8uJ9Wim4tqjqk89K lJjGgYgXU+9NjOfuXA1XQQ9GaAsiaMc01qsA4byYpJEqxnlPtdP/arX0t9HaRW052Yiq mzZqkYDuXOm8kP8TMxsQh9HBG6jGZGUlnZq27XabVn7Hws37jhXLH0xCwOwMl8DQTL8q P6qPIoh4tVxswUYhsuLlqPaXqGaQ95PPF1JyrKp9m8tCNwP05AOEeSRiszoAGqP+/e0v 7AEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q1Ipl0SS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si8252504pls.296.2018.10.25.07.12.23; Thu, 25 Oct 2018 07:12:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q1Ipl0SS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728441AbeJYWov (ORCPT + 32 others); Thu, 25 Oct 2018 18:44:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:53930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeJYWou (ORCPT ); Thu, 25 Oct 2018 18:44:50 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7C93C20848; Thu, 25 Oct 2018 14:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476715; bh=B2QTmEZixvlvUtgeh6v/k8Y0XDg4ZjFGjpTt9H+xO/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q1Ipl0SSzLCwfLNYIdRwnbnX8BTC8mP8T9yc49JEGw6o5Nrzv/UvUEkAWxqCbAsjL ksYuacRsUy98VCNdHN6gKq+E770Wk3+JdQSSJUi9cLib3BvIFAqo+HzlcXYI79CIaE Pf1B9SEcMXfPrZejZALUZdyBjcGvsH1FKD8vlHJ0= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.14 43/46] net: stmmac: mark PM functions as __maybe_unused Date: Thu, 25 Oct 2018 10:10:50 -0400 Message-Id: <20181025141053.213330-43-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 81a8b0799632627b587af31ecd06112397e4ec36 ] The newly added suspend/resume functions cause a build warning when CONFIG_PM is disabled: drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:324:12: error: 'stmmac_pci_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:306:12: error: 'stmmac_pci_suspend' defined but not used [-Werror=unused-function] Mark them as __maybe_unused so gcc can drop them silently. Fixes: b7d0f08e9129 ("net: stmmac: Fix WoL for PCI-based setups") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 6a393b16a1fc..c54a50dbd5ac 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c @@ -303,7 +303,7 @@ static void stmmac_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } -static int stmmac_pci_suspend(struct device *dev) +static int __maybe_unused stmmac_pci_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret; @@ -321,7 +321,7 @@ static int stmmac_pci_suspend(struct device *dev) return 0; } -static int stmmac_pci_resume(struct device *dev) +static int __maybe_unused stmmac_pci_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); int ret;