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: 7939421 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 71A59BEEE5 for ; Fri, 1 Jan 2016 14:39:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84A06203F1 for ; Fri, 1 Jan 2016 14:39:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 45A4B203E3 for ; Fri, 1 Jan 2016 14:39:34 +0000 (UTC) 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: <4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BbIhj 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" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;