From patchwork Wed Feb 28 10:08:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10247085 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 B2EDE60362 for ; Wed, 28 Feb 2018 10:08:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 986A1286BE for ; Wed, 28 Feb 2018 10:08:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D48C28778; Wed, 28 Feb 2018 10:08:15 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 1BE0E286BE for ; Wed, 28 Feb 2018 10:08:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 83FFD6E91C; Wed, 28 Feb 2018 10:08:14 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67E326E918 for ; Wed, 28 Feb 2018 10:08:11 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id w77so1740221wrc.6 for ; Wed, 28 Feb 2018 02:08:11 -0800 (PST) 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:in-reply-to:references; bh=ophhv7H1XX9cqQ8Lh8OlUqu87AvmV9UedxEWvzXbyJc=; b=ZQ1DOXopKNASRFim2oO+BBR83Vc8G9RyjoluijbvlAyErDBi1GdWp5rMxgPAREDr6V Zi0CnGAwCbfZ8y0v0vhfoRKrxDW9bCOajm66VjxBGdXNMJ7D9lV6ozh0tbm0AC1liLfn 9OpOSeV5U6hUDyWTlH7glyRWxgUvK16VPf6bwR/tFcrmOBBe3vIDZFx38L0PcWaRpmP1 K80NbYMH6YWEsjhBrNylUUCooAtN0oSBZ8u6fMYL1ILaYYHg7qs1At9t4d54vjQ5aouA cU8WIWOe2BFJ2ldCoKNuZ2Bf5XWcT6nmolEVHdparsS2Kqg8imHy8XplhRqpv0SunpQl WXPw== 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:in-reply-to :references; bh=ophhv7H1XX9cqQ8Lh8OlUqu87AvmV9UedxEWvzXbyJc=; b=MM7+GNmB5rEO3HQR6K7aJfu9vixH2D5WIrinzP4qZnfPVXuaLWwQMVCTWE8xyvw7B7 6OFnePUf+mYlf8hucXbts+2CUAOffYeetRSL/71nVeYTJQZ2Mpu7+MkYwpCF5KloFplo 3CiqKfJ4UQ9xwGaVzztx3wz4+l0NpHqU6lhoGxPqHRGcPQBF6qHr/z3irdBN7pGCybFA SFPfff+uukH8BbkKIukaQpyf/hCj/FobXz7uVe/K2phnINqQAIOHxhZuWFSbR1JubtlU 7mt9z0zHtQdEx3SlMKlcH6gDCIhKkktE2FWUrUUGM1VlNGjL8Mgg7OXBjisiYEROCLXx zGHg== X-Gm-Message-State: APf1xPAaMysw+AvpJF+iw6m1yFQyYjHAKsA8oakHFf6eWPq7ouOFSYf1 CDVRTZhkD7+bVldycj/taU+hbQ== X-Google-Smtp-Source: AH8x224dRd1wARjAjqSkM9qlidG/88DmkHZAbE5Xzp7ZZxKuy/CduqM+kGvSECdprPX66WzzQR3qSg== X-Received: by 10.223.170.153 with SMTP id h25mr15027178wrc.236.1519812490067; Wed, 28 Feb 2018 02:08:10 -0800 (PST) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id 63sm1143121wmd.17.2018.02.28.02.08.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 02:08:09 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Wed, 28 Feb 2018 10:08:00 +0000 Message-Id: <20180228100800.11840-2-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180228100800.11840-1-tvrtko.ursulin@linux.intel.com> References: <20180228100800.11840-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] tests/perf: Fix build 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 Move variable declaration to top of scope to avoid C90 build warning. Signed-off-by: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin --- tests/perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/perf.c b/tests/perf.c index c302a355b850..78bf6cdd3504 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -1726,6 +1726,7 @@ test_oa_exponents(void) int buf_size = sample_size * max_reports * 1.5; uint8_t *buf = calloc(1, buf_size); int ret, n_timer_reports = 0; + uint32_t matches = 0; struct { uint32_t report[64]; } timer_reports[30]; @@ -1785,7 +1786,6 @@ test_oa_exponents(void) igt_debug("report%04i ts=%08x hw_id=0x%08x\n", 0, timer_reports[0].report[1], oa_report_get_ctx_id(timer_reports[0].report)); - uint32_t matches = 0; for (int i = 1; i < n_timer_reports; i++) { uint32_t delta = timer_reports[i].report[1] - timer_reports[i - 1].report[1];