From patchwork Fri May 19 18:01:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 9737857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 318406034C for ; Fri, 19 May 2017 18:01:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EB8284BB for ; Fri, 19 May 2017 18:01:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D88528575; Fri, 19 May 2017 18:01:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A1C2284BB for ; Fri, 19 May 2017 18:01:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 144AE6E722; Fri, 19 May 2017 18:01:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id DF6046E722 for ; Fri, 19 May 2017 18:01:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 847B310A260B; Fri, 19 May 2017 11:01:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0wAPV4CnWtel; Fri, 19 May 2017 11:01:36 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id F095010A260D; Fri, 19 May 2017 11:01:33 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id E1D082E2934; Fri, 19 May 2017 11:01:32 -0700 (PDT) From: Eric Anholt To: dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH] drm/pl111: Fix defined-but-not-used warnings in COMPILE_TEST mode. Date: Fri, 19 May 2017 11:01:32 -0700 Message-Id: <20170519180132.20305-1-eric@anholt.net> X-Mailer: git-send-email 2.11.0 Cc: Stephen Rothwell , linux-kernel@vger.kernel.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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Our probe function is guarded by CONFIG_ARM_ABMA, so these functions end up unused if it's not enabled. We do want to be able to build DRM drivers on inapplicable platforms, for refactor testing purposees. Signed-off-by: Eric Anholt --- drivers/gpu/drm/pl111/pl111_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 936403f65508..0a99a80dc354 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -78,7 +78,7 @@ struct drm_mode_config_funcs mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static int pl111_modeset_init(struct drm_device *dev) +static int __used pl111_modeset_init(struct drm_device *dev) { struct drm_mode_config *mode_config; struct pl111_drm_dev_private *priv = dev->dev_private; @@ -146,7 +146,7 @@ static void pl111_lastclose(struct drm_device *dev) drm_fbdev_cma_restore_mode(priv->fbdev); } -static struct drm_driver pl111_drm_driver = { +static struct drm_driver __used pl111_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC, .lastclose = pl111_lastclose,