From patchwork Mon Jun 27 10:58:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 9200307 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 5202D607D3 for ; Mon, 27 Jun 2016 10:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41DB028565 for ; Mon, 27 Jun 2016 10:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34E1228581; Mon, 27 Jun 2016 10:58:38 +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, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4893F28565 for ; Mon, 27 Jun 2016 10:58:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5254588A58; Mon, 27 Jun 2016 10:58:35 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92EBC89AB7 for ; Mon, 27 Jun 2016 10:58:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: robertfoss) with ESMTPSA id 2EBCF260A00 From: robert.foss@collabora.com To: daniel.vetter@ffwll.ch, daniel.stone@collabora.com, marius.c.vlad@intel.com, tomeu.vizoso@collabora.com, chris@chris-wilson.co.uk Date: Mon, 27 Jun 2016 06:58:24 -0400 Message-Id: <1467025104-32155-1-git-send-email-robert.foss@collabora.com> X-Mailer: git-send-email 2.7.4 Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PACTH i-g-t v1] lib/igt_gt: Fix unused variable warning for non-x86 targets X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Robert Foss Moved variable declaration inside #if case to avoid unused variable warnings on non-x86 targets. Signed-off-by: Robert Foss Reviewed-by: Chris Wilson --- lib/igt_gt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/igt_gt.c b/lib/igt_gt.c index a3d6a73..8a53775 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -383,9 +383,10 @@ int igt_open_forcewake_handle(void) return -1; return igt_debugfs_open("i915_forcewake_user", O_WRONLY); } -static unsigned int clflush_size; #if defined(__x86_64__) || defined(__i386__) +static unsigned int clflush_size; + int igt_setup_clflush(void) { FILE *file;