From patchwork Wed Mar 16 18:36:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12783034 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDFF3C433EF for ; Wed, 16 Mar 2022 18:37:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3167210E930; Wed, 16 Mar 2022 18:37:36 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CD2F10E930 for ; Wed, 16 Mar 2022 18:37:35 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6F0B6B81CA3; Wed, 16 Mar 2022 18:37:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CF1AC340F7; Wed, 16 Mar 2022 18:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647455850; bh=SIbAZruduzRSnrWzOuWAI4SxaF18hsmgKxmS/1M5bhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7pAnQaGxH5XguHxVvJXRImcQeTVI3Ghe06RgDHhhIeS2LKTdJ5665C2pJ5SdYO+7 Di2cKTvLZSwnBz71+ZkTKj6c8kFx9zThPZCxgSspTu24wQJPs59+/IYh9gqBDNoM0p GzeFUdcI+WWA0Pioii1/wbYWRjGV03+Dc+DnuF5sBGLI1FT/wCbTjT3CowmUgylqP8 /aOUAkBV7+slOzBawZSK0Q6+rP77MxjawrlvTZUAMclTdgyLVYKobaUFFyo01GQm5A D/Zy9AtQ+M4e4OGlPYqOEfLm8Toee2Tg8HVhC3AVBbtQ6wQ3v5TksI/TbTDXwO5gIZ WMJ7CvOwTgfiQ== From: Arnd Bergmann To: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , Dmitry Osipenko , Ulf Hansson Subject: [PATCH] drm/tegra: vic: fix unused-function warnings Date: Wed, 16 Mar 2022 19:36:47 +0100 Message-Id: <20220316183708.1505846-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220316183708.1505846-1-arnd@kernel.org> References: <20220316183708.1505846-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mikko Perttunen , linux-tegra@vger.kernel.org, Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The use of the old-style SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() macros requires function definitions to be hidden to avoid drivers/gpu/drm/tegra/vic.c:326:12: error: 'vic_runtime_suspend' defined but not used [-Werror=unused-function] 326 | static int vic_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c:292:12: error: 'vic_runtime_resume' defined but not used [-Werror=unused-function] 292 | static int vic_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~ Use the new-style SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() instead. Fixes: 1e15f5b911d6 ("drm/tegra: vic: Stop channel on suspend") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/tegra/vic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) I see this warning on 5.17-rc8, but did not test it on linux-next, which may already have a fix. diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index 1e342fa3d27b..f56f5921a8c2 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -513,9 +513,8 @@ static int vic_remove(struct platform_device *pdev) } static const struct dev_pm_ops vic_pm_ops = { - SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; struct platform_driver tegra_vic_driver = {