From patchwork Thu Jun 30 12:23:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102068 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp363791qgy; Thu, 30 Jun 2016 05:21:07 -0700 (PDT) X-Received: by 10.98.43.7 with SMTP id r7mr20877246pfr.65.1467289267697; Thu, 30 Jun 2016 05:21:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pl18si4288040pab.45.2016.06.30.05.21.07; Thu, 30 Jun 2016 05:21:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932199AbcF3MVE (ORCPT + 30 others); Thu, 30 Jun 2016 08:21:04 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:52916 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932106AbcF3MVB (ORCPT ); Thu, 30 Jun 2016 08:21:01 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0M3JRY-1baOrV10eO-00r2uG; Thu, 30 Jun 2016 14:20:53 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Laurent Pinchart , Arnd Bergmann , Laurent Pinchart , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] [media] vsp1: use __maybe_unused for PM handlers Date: Thu, 30 Jun 2016 14:23:02 +0200 Message-Id: <20160630122325.4002029-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:GVX3SXdx8SIFDTZFclKT7Eu/kNxb7sBX7cjNwfrsE6mnsfXsOwL paOH8UDlRrDylbXeoHxNtWOv8PNbvqHu3tk3/VFxEibk7LkPUUClnRHVQfUGX25rkRDMvdz 3PYHS1aDfgXXMskpkKGKl4gjQ8t9kmTPr+zCEjYeo6WHyYZGNAwn7TinsYI90fe9u5GujOY Xar+AmdsLnBeJSBYYNhtw== X-UI-Out-Filterresults: notjunk:1; V01:K0:9BkPEbTgOMw=:vk5/65CL5k1jt+XoiI4E/F k9UWhBsL68U10jEEip1X3Uerq1/ft5CZadhgCpy0PlMT1uQQzet7GupQQKmUeixq9db/7jEMn f4m2OAJ1vCevH+lBCeJGMaglP1NqQfKPxt4NmpEN2N2vE1HB2oH4DBtQwlN1B5l4ja5jjaeJF ecN8E0AEuqAJB4gi7ygXUt/99Kr10r2gcc2QvWgTD4OmXughbfLRB+1qSeOYL2AqrNLPFSiOq vtx+CaaV4OyH4p+PUUe/p2bwIaL37fmPTskJ2cdgqf3/nXZ/zk5nM+uk79prNdmsZpjh4akHY pPMhkzrW72I4f+NGMtLTs8mHuSEto7+l2Br7n/igRee94yrhfUdWreststckzcpJ2kO86RwjA 6OLGM++8DMj5NORcq8p5JqNHfxG+R2Td8SZPdmkQSquDK6a97Sj+E8DilTitosnl+wB1AUXzr 0bRd0TrI4FzKLY5yL2dcz8QHPQRqLt1Nrjmk29BhRIpWrU5R5PNQf2PCjJ8aGxxO/asEOyqKK NlFuGLR14jpE8JcBudDgITQlIQ+TUHVpZQFsOsBWzejDU7Jov2gkVKEb/JT1Hkggr2hbkXj+p JielMtEUotUDxQwVwemCSlKbLs8ChONEgOBLh1P/nn3pOf4a5vcpwUCCEX2w7OjareECvjNgw Th7Yq+vXKXdJ7yy7enMerejCDezhVbXhw5cWB7XDh/J+sQlKfk7Miz1J+e9st3fY6b/k= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building without CONFIG_PM results in a harmless warning from slightly incorrect #ifdef guards: drivers/media/platform/vsp1/vsp1_drv.c:525:12: error: 'vsp1_pm_runtime_resume' defined but not used [-Werror=unused-function] drivers/media/platform/vsp1/vsp1_drv.c:516:12: error: 'vsp1_pm_runtime_suspend' defined but not used [-Werror=unused-function] This removes the existing #ifdef and instead marks all four PM functions as __maybe_unused. Signed-off-by: Arnd Bergmann Fixes: 1e6af546ee66 ("[media] v4l: vsp1: Implement runtime PM support") --- drivers/media/platform/vsp1/vsp1_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.9.0 diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index e655639af7e2..0c7fd43d6fb7 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -491,8 +491,7 @@ void vsp1_device_put(struct vsp1_device *vsp1) * Power Management */ -#ifdef CONFIG_PM_SLEEP -static int vsp1_pm_suspend(struct device *dev) +static int __maybe_unused vsp1_pm_suspend(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -502,7 +501,7 @@ static int vsp1_pm_suspend(struct device *dev) return 0; } -static int vsp1_pm_resume(struct device *dev) +static int __maybe_unused vsp1_pm_resume(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -511,9 +510,8 @@ static int vsp1_pm_resume(struct device *dev) return 0; } -#endif -static int vsp1_pm_runtime_suspend(struct device *dev) +static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); @@ -522,7 +520,7 @@ static int vsp1_pm_runtime_suspend(struct device *dev) return 0; } -static int vsp1_pm_runtime_resume(struct device *dev) +static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev) { struct vsp1_device *vsp1 = dev_get_drvdata(dev); int ret;