From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DDC1C43217 for ; Mon, 4 Oct 2021 12:56:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B19360F9C for ; Mon, 4 Oct 2021 12:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233760AbhJDM6X (ORCPT ); Mon, 4 Oct 2021 08:58:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:58126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbhJDM5f (ORCPT ); Mon, 4 Oct 2021 08:57:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1729A6136F; Mon, 4 Oct 2021 12:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633352146; bh=LtFDb+OlNbQ3uDCXmfCdM2NkAwXmwWP1Igcg5xMNyTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fiCgOGUrtp2fvDXQSDSQZCCwlcOBM3NE72ndvpeByu6nFdcVSJvk6Tf/zpvFHkt2I Srp4rQmPulHP/LqQa96+y7ood82M3Ck+06COAxNmrjp+lmUONFe56ck5BLJ/vNvCft wn22JcYmoyl55r+3uhNHzHAAFw1p8AKFIi5Opxxw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Linus Torvalds , Sasha Levin Subject: [PATCH 4.4 23/41] spi: Fix tegra20 build with CONFIG_PM=n Date: Mon, 4 Oct 2021 14:52:14 +0200 Message-Id: <20211004125027.316190460@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125026.597501645@linuxfoundation.org> References: <20211004125026.597501645@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: Linus Torvalds [ Upstream commit efafec27c5658ed987e720130772f8933c685e87 ] Without CONFIG_PM enabled, the SET_RUNTIME_PM_OPS() macro ends up being empty, and the only use of tegra_slink_runtime_{resume,suspend} goes away, resulting in drivers/spi/spi-tegra20-slink.c:1200:12: error: ‘tegra_slink_runtime_resume’ defined but not used [-Werror=unused-function] 1200 | static int tegra_slink_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-tegra20-slink.c:1188:12: error: ‘tegra_slink_runtime_suspend’ defined but not used [-Werror=unused-function] 1188 | static int tegra_slink_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mark the functions __maybe_unused to make the build happy. This hits the alpha allmodconfig build (and others). Reported-by: Guenter Roeck Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- drivers/spi/spi-tegra20-slink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1210,7 +1210,7 @@ static int tegra_slink_resume(struct dev } #endif -static int tegra_slink_runtime_suspend(struct device *dev) +static int __maybe_unused tegra_slink_runtime_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct tegra_slink_data *tspi = spi_master_get_devdata(master); @@ -1222,7 +1222,7 @@ static int tegra_slink_runtime_suspend(s return 0; } -static int tegra_slink_runtime_resume(struct device *dev) +static int __maybe_unused tegra_slink_runtime_resume(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct tegra_slink_data *tspi = spi_master_get_devdata(master);