From patchwork Wed Jan 22 12:19:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 1227213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 482kxf096pz9sPn for ; Wed, 22 Jan 2020 23:20:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728981AbgAVMUE (ORCPT ); Wed, 22 Jan 2020 07:20:04 -0500 Received: from foss.arm.com ([217.140.110.172]:55764 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbgAVMUD (ORCPT ); Wed, 22 Jan 2020 07:20:03 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BB71328; Wed, 22 Jan 2020 04:20:03 -0800 (PST) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E5EA33F52E; Wed, 22 Jan 2020 04:20:01 -0800 (PST) From: Vincenzo Frascino To: thierry.reding@gmail.com, airlied@linux.ie, daniel@ffwll.ch, jonathanh@nvidia.com Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, vincenzo.frascino@arm.com Subject: [PATCH] drm: tegra: Fix warning in PM ops Date: Wed, 22 Jan 2020 12:19:51 +0000 Message-Id: <20200122121951.52639-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org The tegra driver can be compiled without CONFIG_PM_SLEEP enabled. In this case the compilation triggers the warning below: drivers/gpu/drm/tegra/sor.c:3984:12: warning: ‘tegra_sor_resume’ defined but not used [-Wunused-function] 3984 | static int tegra_sor_resume(struct device *dev) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/sor.c:3970:12: warning: ‘tegra_sor_suspend’ defined but not used [-Wunused-function] 3970 | static int tegra_sor_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~ Fix the warning adding __maybe_unused to the PM functions. Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Hunter Signed-off-by: Vincenzo Frascino --- drivers/gpu/drm/tegra/sor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index a68d3b36b972..69b9ebee7486 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3912,7 +3912,7 @@ static int tegra_sor_remove(struct platform_device *pdev) return 0; } -static int tegra_sor_runtime_suspend(struct device *dev) +static int __maybe_unused tegra_sor_runtime_suspend(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err; @@ -3934,7 +3934,7 @@ static int tegra_sor_runtime_suspend(struct device *dev) return 0; } -static int tegra_sor_runtime_resume(struct device *dev) +static int __maybe_unused tegra_sor_runtime_resume(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err; @@ -3967,7 +3967,7 @@ static int tegra_sor_runtime_resume(struct device *dev) return 0; } -static int tegra_sor_suspend(struct device *dev) +static int __maybe_unused tegra_sor_suspend(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err; @@ -3981,7 +3981,7 @@ static int tegra_sor_suspend(struct device *dev) return 0; } -static int tegra_sor_resume(struct device *dev) +static int __maybe_unused tegra_sor_resume(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err;