From patchwork Fri Jan 1 14:39:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101222 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3990961lbb; Fri, 1 Jan 2016 06:39:33 -0800 (PST) X-Received: by 10.66.184.15 with SMTP id eq15mr52442630pac.42.1451659173698; Fri, 01 Jan 2016 06:39:33 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id v65si10578814pfi.240.2016.01.01.06.39.33; Fri, 01 Jan 2016 06:39:33 -0800 (PST) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D0CC6E3B7; Fri, 1 Jan 2016 06:39:32 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8419F6E3B7 for ; Fri, 1 Jan 2016 06:39:28 -0800 (PST) Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MhUV0-1aaXsm2FH8-00Me6q; Fri, 01 Jan 2016 15:39:22 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] drm: arm-hdlcd: fix build warnings for !CONFIG_PM Date: Fri, 01 Jan 2016 15:39:17 +0100 Message-ID: <2621741.YulfsnvZOh@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <4194408.X82ccDjh5X@wuerfel> References: <4194408.X82ccDjh5X@wuerfel> MIME-Version: 1.0 X-Provags-ID: V03:K0:2xpWuesb7IpcH/iMXxgUwuVawgLeg+qYkQoLZ/U9AcPlvve0/BI U1i4dmBpCpLa+TRa+/fP2iQxE8NB1ttqUQpQpIWq57sr6lJI3QIwE1QIk8ygOf/kEOhy55N XE0nDqVuA2wub2r0op1eAgw1Ji5AqPMUuTOXYY7wcuMGZjTBNj/EqvH/Mfimbh7xM+FvUmy MG5HY4PqB3DDxkeD2lZTg== X-UI-Out-Filterresults: notjunk:1; V01:K0:0Hk0B2ij3So=:TjOzmMy+eXJAPCzyoFtYAW D6PBhHtX2W+y9XOEfEanBoCuKVrW8COAjNVwB7hRfYMVH4sYPNJzu0Sro27wYAe4lwoAgYkpt mChymsha8qu7h0wuiRjYi6fxyWaa0M1hk7c0kQMpo3LdXZ25/6kab+dzGbOEVismnv5axNcV8 HZk1d+nZWl6/HoI2eVnkHDxUUCkCUXaaulF6f4JvE6W56KDG251zJ0xKkI6P4Cnw/o1NUvhQY HSq702Foo8bK8jWuacN2bERRoP3C95oB92LisQUUyvGkkaWOD65XH7P/XxqYt2tkyGJyrKAYE K6yeoMZFYA6FjiXHBBke5u5/O1YjAd4IC5xOuq+nSmu5pD+6ZpEvbY/J4YcmYt5+JPkgVzgZo jtU2ZU9CRQOmLcGHvQlUYKglimbUribqZiYv/I4JIeUG0DSH+Lmyg9c52swJMXbQFheAsXFsd jcBgBcVSRav4lnyuvLH4WsZKp8NtVrJ9JOivkE5JNQBrUdS+e27G9OnnY2NOjAK7BThzG3Ou4 y0obJC+txvQvztuYkn2nXYZIEcJIrOA2sBGFKvHnSJVCDuI1T0RYaRJOqL6jGU5aZ06rSwN0P Fn87OzYtSCrBO7En/USm3myJ359NCm+q8Tbihq/EgfwJGR4Dz7Po/jGlhSH1fJ2RJAmUKfO0O zjLZWaSux/T4O2vfaKUB4HL8kEkM/YI1u8b/0i0NMYKuFyMO/JWERf8UOluBxi+el1owCmWjR Qo2wlIJNClcBbIhj Cc: Liviu Dudau , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The hdlcd_pm_suspend and hdlcd_pm_resume are intentionally unused when CONFIG_PM is not set in this driver, and we get a compiler warning for this: drivers/gpu/drm/arm/hdlcd_drv.c:521:12: warning: 'hdlcd_pm_suspend' defined but not used [-Wunused-function] drivers/gpu/drm/arm/hdlcd_drv.c:536:12: warning: 'hdlcd_pm_resume' defined but not used [-Wunused-function] This adds a __maybe_unused annotation for the two functions, to let the compiler know this is the intended behavior. This is better than an #ifdef as it improves the compile time coverage of the code and it looks nicer. Signed-off-by: Arnd Bergmann Reviewed-by: Thierry Reding diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 31969efe97d4..6173bb835223 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -518,7 +518,7 @@ static const struct of_device_id hdlcd_of_match[] = { }; MODULE_DEVICE_TABLE(of, hdlcd_of_match); -static int hdlcd_pm_suspend(struct device *dev) +static int __maybe_unused hdlcd_pm_suspend(struct device *dev) { struct drm_device *drm = dev_get_drvdata(dev); struct drm_crtc *crtc; @@ -533,7 +533,7 @@ static int hdlcd_pm_suspend(struct device *dev) return 0; } -static int hdlcd_pm_resume(struct device *dev) +static int __maybe_unused hdlcd_pm_resume(struct device *dev) { struct drm_device *drm = dev_get_drvdata(dev); struct drm_crtc *crtc;