From patchwork Mon Feb 19 10:17:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10227409 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 3AC1F602B7 for ; Mon, 19 Feb 2018 10:17:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B9A32896D for ; Mon, 19 Feb 2018 10:17:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FB39289C7; Mon, 19 Feb 2018 10:17: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 9AACD2896D for ; Mon, 19 Feb 2018 10:17:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16F016E107; Mon, 19 Feb 2018 10:17:14 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1E3BD6E0FB for ; Mon, 19 Feb 2018 10:17:12 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id n7so9026542wrn.5 for ; Mon, 19 Feb 2018 02:17: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=buoUVLn/ObXYNw5sPPVE3bwNY77VvAmyb8+Y86lbFfk=; b=lEb2Lg5tDXSlWxX3USdFo7UcLrEmRtdiJs5Sd9mwcCLXofi8RZ9AT8dcIOntPY+MbN J+ozXsHCd5JdDwpVm+/gAZrm4VwApk+dfbYlv0PA9zrwKPFoN7a6FHuBWwEB2uvZpTiP QoMlJJPzhplbiSN6mZ/srVoh0RmWYPUwgDkeOs/J/3FRAyhtQc0DBb+W0n5SQmZGq9m5 g3UzXODuQAPIZUl8IFGqWcJuiSTNyeiEqbm/EM2hfwiqK7DIOr1SD9/jfQn2sor5LJyk DqSg0s3dMVxDTuTmw8rhOMTr0hb+509ZLVqtw7tJyrHpe1cE6eDfcge0d5xgEiQ0TJMW vHSg== 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=buoUVLn/ObXYNw5sPPVE3bwNY77VvAmyb8+Y86lbFfk=; b=CeAbJeoGNEaIWXVjpxmfRQLuSA75x60SiEmE/jKX85knpfNyZzsnh0iaMIfyUGHvjX hyZlNYX84BbSkza4wztAZO5qWVVlMsMU6ClGhML+spEBqnDKzRcuBiI5dEAl7sa1sw6A +vuEXeqQZwGvek0lMD5fHTWwcforr1THT32s+4MiY/pE5fA58EB4E6wH/qcbztpQQJ2y 2psUjY3nSvv0cXVhmZW9/juSiFfRFIBsnBSDvxUXK9jHbirndUy/lq9jUKkHQH1qjmrG xHP3ysrEj94mUM81P36jC4Qt2E4XpA6KY0nIfGH0KgwWfZ/Lb85xwvHcGLKhdRj9LaIi sBrg== X-Gm-Message-State: APf1xPC4x0Km+1KBzHgX6/IBi9r+QuVaWCsM5JsRday0wKIT7m7zBVCB k+KSXyRDRssi7DN82pa1zROWHg== X-Google-Smtp-Source: AH8x2256JBQvt/XKz41OZKDrq50PLWNLi31B8JQVhxEtb3XrYnjHzmjLMDigVjTh8soqJDqs6LJrmw== X-Received: by 10.223.149.70 with SMTP id 64mr3282132wrs.76.1519035430650; Mon, 19 Feb 2018 02:17:10 -0800 (PST) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id s80sm15395251wrc.93.2018.02.19.02.17.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 02:17:10 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 19 Feb 2018 10:17:02 +0000 Message-Id: <20180219101702.30707-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <151903517768.2041.4670562671355178120@mail.alporthouse.com> References: <151903517768.2041.4670562671355178120@mail.alporthouse.com> Subject: [Intel-gfx] [PATCH i-g-t v2] perf_pmu: Fix some compile warnings with old compilers / 32-bit builds 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 Correct printf format for uint64_t and one "may be uninitialized". v2: Fix one more "may be uninitialized". (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reported-by: Chris Wilson Reviewed-by: Chris Wilson --- tests/perf_pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index 82053416cbea..bed4c257013d 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -300,7 +300,7 @@ busy_double_start(int gem_fd, const struct intel_execution_engine2 *e) usleep(batch_duration_ns / 1000); val2 = pmu_read_single(fd) - val2; - igt_info("busy=%lu idle=%lu\n", val, val2); + igt_info("busy=%"PRIu64" idle=%"PRIu64"\n", val, val2); igt_spin_batch_free(gem_fd, spin[0]); igt_spin_batch_free(gem_fd, spin[1]); @@ -340,11 +340,11 @@ busy_check_all(int gem_fd, const struct intel_execution_engine2 *e, { const struct intel_execution_engine2 *e_; uint64_t tval[2][num_engines]; + unsigned int busy_idx = 0, i; uint64_t val[num_engines]; int fd[num_engines]; unsigned long slept; igt_spin_t *spin; - unsigned int busy_idx, i; i = 0; fd[0] = -1; @@ -1758,7 +1758,7 @@ igt_main * Check render nodes are counted. */ igt_subtest_group { - int render_fd; + int render_fd = -1; igt_fixture { render_fd = drm_open_driver_render(DRIVER_INTEL);