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; From patchwork Thu Jun 30 12:23:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102067 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp364214qgy; Thu, 30 Jun 2016 05:21:59 -0700 (PDT) X-Received: by 10.66.138.43 with SMTP id qn11mr20825007pab.1.1467289319591; Thu, 30 Jun 2016 05:21:59 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si4356380pfg.5.2016.06.30.05.21.59; Thu, 30 Jun 2016 05:21:59 -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 S932111AbcF3MV5 (ORCPT + 30 others); Thu, 30 Jun 2016 08:21:57 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:57651 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbcF3MV4 (ORCPT ); Thu, 30 Jun 2016 08:21:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0LrmbG-1bTGlv45nS-013eu6; Thu, 30 Jun 2016 14:21:34 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Laurent Pinchart , Arnd Bergmann , Hans Verkuil , Simon Horman , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] [media] vsp1: clarify FCP dependency Date: Thu, 30 Jun 2016 14:23:03 +0200 Message-Id: <20160630122325.4002029-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160630122325.4002029-1-arnd@arndb.de> References: <20160630122325.4002029-1-arnd@arndb.de> X-Provags-ID: V03:K0:IuVA0h98A5HPBHh5FRqd37w7vyX42st5zFtE5gl0IF3uZgyLPpi znSRm0DZGVtKBsYDDb3WBWXjN5OT7BgtYYpWX6NRwJTHzKm6Ucg4Cx7mjhmoBE8J5Dbw3GR vxMBcTOOkIcgJ42Ie0TFkg+sGorR3Cb+nsSakicLSOz+cXBETOCO3u1b/QhZ8aYRcbmMEEj Tji++cPLj4XI2X1Pah11A== X-UI-Out-Filterresults: notjunk:1; V01:K0:Xl6Ix9Zw8oY=:PAdtqM9WO72w8cM6KWsRE1 lJ/AiGiYS6FfRHMM3g4jAC6PGA6qnyqpldeSe3CqfTFUI/4weYrQP+RbRfMBu1uQvlZbJ14lH L2MZ6hVJDg++weukt56DHfcDQqge4c+BdwXMizVGnWnQ9D1UJcTOPBmOZODKbtE956WooUyde 2AlT17lHuomzlUL67IitLxUzHp5vvqBGw7YZLdN0zO6d03CmaL6v4GI1OFxN6jMMmLmyIVBgy +ypqTkAb9S9y+H7HIW6xEd95KFcZZ18FkCZmoFz7vZKz6SejkK4q3rr0ZRHrcqw8DywW3WsJt Bf/uuZ6wq58gbjwBisDHHJVXI35YZr6sVnl6yeNJ2Qapqbt0IeWfCNbEJwMWEmGSjxZsILM4/ vaA5JRrKr81xOBNtYkVt48ohtHdylo8V38ZQtZEVH/10KvAdl51d/E9gjpdltI2udGTjiDDsa pEDJVXbnEegNohUoBpZxZ8AkCqowucfi8MVjkhiTmSkZNx1vYDqJkWyCXBB6QBLpYEQxBummj 9Z9OLpgdcwqYjFQwt+nfyDkasYM3hqG/pTFDoh/zOweP+GC+yyHVIdtYmcBP/KaJc2RBen0vw y8tln9kgvPWOg+LNs1r0aVPuaD7AdsTZ5n22Oa7lYFhtjcgwRlFGEyFakj86WDF7MJAjGAbEE lLgU74xAVe4UM2cb+AcilDeMc33DIzWPzNCfUzNTlEC4y7gpr/2RqPlmi4AHKm2IcvwY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added FCP support in the vsp1 driver causes a link error when CONFIG_RENESAS_FCP=m, since it's not reachable by built-in code: drivers/media/built-in.o: In function `vsp1_remove': :(.text+0xdeca0): undefined reference to `rcar_fcp_put' drivers/media/built-in.o: In function `vsp1_probe': :(.text+0xdef44): undefined reference to `rcar_fcp_get' We already have a conditional dependency on FCP that requires it for ARM64, so for all others we just have to prevent setting RENESAS_VSP1=y when RENESAS_FCP=m by extending the FCP dependency. Signed-off-by: Arnd Bergmann Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support") --- drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 9d0a3ffe36d2..8b6ac7d08289 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -265,7 +265,7 @@ config VIDEO_RENESAS_VSP1 tristate "Renesas VSP1 Video Processing Engine" depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA depends on (ARCH_RENESAS && OF) || COMPILE_TEST - depends on !ARM64 || VIDEO_RENESAS_FCP + depends on (!ARM64 && !VIDEO_RENESAS_FCP) || VIDEO_RENESAS_FCP select VIDEOBUF2_DMA_CONTIG ---help--- This is a V4L2 driver for the Renesas VSP1 video processing engine.