From patchwork Mon Apr 9 16:35:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10331743 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 039396022E for ; Mon, 9 Apr 2018 16:35:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E911928A4E for ; Mon, 9 Apr 2018 16:35:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD1F628B72; Mon, 9 Apr 2018 16:35:52 +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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 7462D28A4E for ; Mon, 9 Apr 2018 16:35:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5309789E38; Mon, 9 Apr 2018 16:35:51 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D70489E35 for ; Mon, 9 Apr 2018 16:35:49 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id r82so18113983wme.0 for ; Mon, 09 Apr 2018 09:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=WLNzuFqDydHj9RNCCzyvx7E+b5Khkxw0j5UUFoNfBPY=; b=zpPamslUp4ABXLGQF/wpf5zTM0fo8otD+Kj9CSFTqWx9mPI3bMm5vyAMC6daymM6Xi 7P4kLh04rytbDVJNBRlFzycCfFffukZ+niaielOleqT6OHSAzsbmnlOc7vG17ox4Apsu ioxzPU2922Ppvruk1o474T/Ab6xV3KzyeRa5iB+XKQwj164RbprHCYX/KYaFpsRY4fDK hSeggMfg300fI5D5LbDCQyN3DIf6rQmwkaFkE8yDYX2bY4Mt6LhqewAT8TpxFSwrBZJf roPI42kUBHkDGSGQr2KZPDzBdLeyvHEMcWg1GMRKa39R0mKp4wI++zOAu+WMM2sLxdxO kwHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WLNzuFqDydHj9RNCCzyvx7E+b5Khkxw0j5UUFoNfBPY=; b=e60AC8ZkoHL2IuM4jqlWTfHtwPDHlWYUrJRqV8pt5GB/mDS+Z76XuzmUv4RpyBWpyX vXYoF7uuApSdKYf1hzhoWQQfw0wHS/wj+j72CS+7VBNf/Kt7U3lbuqTf5CNxgnNSKU+V 20w56nyPQqH566qzXaSNuWYktLAQ2KkLlI1CTdfy8h5dNxItjcTIUqZqz73/HaNKq+iD 3BbDi/mVTNLkJaQw80LjylkYRJusarAm9jYHWN3433CvHyTvU+svqY6k5XeXkjfMo9cH FMu74WZCLJFWaFMemWdrXGItFfoqtX0yHY53RghfupCFUlPiXNDfYuRNtrXOT24rINXj me1g== X-Gm-Message-State: ALQs6tAj+4taUenU1Mipzj0C7aGmLtbGLdmS63QlS4fC5xIBEKecGwt/ mB/OJoa9PuA4p4qQO5MAtAcneu6j X-Google-Smtp-Source: AIpwx4+ThHWv33evpWk7YFNbw/lG18Ua8v55HG5yvr4j/Js8MJA6aicCvK4dUYrelcUvAvEoRnjY1A== X-Received: by 10.28.7.133 with SMTP id 127mr457286wmh.74.1523291748030; Mon, 09 Apr 2018 09:35:48 -0700 (PDT) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id 62sm541423wrg.34.2018.04.09.09.35.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 09:35:47 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 9 Apr 2018 17:35:39 +0100 Message-Id: <20180409163539.13980-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Back to a clean build with no warnings, at least for me. Signed-off-by: Tvrtko Ursulin Cc: Jordan Justen Cc: Scott D Phillips Reviewed-by: Scott D Phillips --- tools/aubdump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/aubdump.c b/tools/aubdump.c index 267061b0fc2b..2d2b6c607a43 100644 --- a/tools/aubdump.c +++ b/tools/aubdump.c @@ -394,10 +394,11 @@ gen8_emit_ggtt_pte_for_range(uint64_t start, uint64_t end) entry_addr = start & ~(4096 - 1); do { + uint64_t last_page_entry, num_entries; + page_num = entry_addr >> 21; - uint64_t last_page_entry = - min((page_num + 1) << 21, end_aligned); - uint64_t num_entries = (last_page_entry - entry_addr) >> 12; + last_page_entry = min((page_num + 1) << 21, end_aligned); + num_entries = (last_page_entry - entry_addr) >> 12; mem_trace_memory_write_header_out( entry_addr >> 9, num_entries * GEN8_PTE_SIZE, AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_GGTT_ENTRY);