From patchwork Mon Feb 19 10:04:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10227361 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 86DB7602DC for ; Mon, 19 Feb 2018 10:04:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D81C2894E for ; Mon, 19 Feb 2018 10:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6219E2898C; Mon, 19 Feb 2018 10:04:23 +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 D3D252894E for ; Mon, 19 Feb 2018 10:04:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20DE889F99; Mon, 19 Feb 2018 10:04:21 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 319A789F99 for ; Mon, 19 Feb 2018 10:04:18 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id z81so14000591wmb.4 for ; Mon, 19 Feb 2018 02:04:18 -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; bh=U0LeS3rbcn4wWYxcdgcPvh6Ok77bHn4eRu6NiSSdSRI=; b=c7fQfHGwCre/5wUQyPFBkgR7CxX2zuMKpJymhB0Mku4FUoSIPrahMzfYtUQCwpLUNt +9j2usZV1ZUNP28XLeKt1AcAPTEdhh8jTnMcrl8e4LZLysQRH0878KH2ABUCW7tpr1dJ UiOXojQKHVWLz73y8RPHwGZxOXkxMFEFdiZ1UchHr0oDMl1LG2+8Hr6CJIeuA1JZi/MO V5Iui9ZSRvFn3rl4Qv1/pOl/pU1IIHo5puuTzkbEVxhwuFnEmOHzZdRHDisI1R209wBk GXaFKAPoLXUKir33Fg/qq8YySJm5yGX05CUKNTEoBJOgLfI5IVN4f+ehH2m3UVheyD7l FiUw== 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=U0LeS3rbcn4wWYxcdgcPvh6Ok77bHn4eRu6NiSSdSRI=; b=bmo0kN6pyOsjPfhxR7NvjcTSnk+XNjAVrL9rWT2xulSo5Q71SNQU5bpEEN/VKsvJpI mwY4pmwa9ZRas6SYIb4pdOe9hsEyO/+FH0jIAp0CTXH2tJZ8rZ+VIGytlAtiV0+OUkse 9u9m/il8k95QuXCQ/R9NduysbAa8oHq1A1w8oVrgXKfhdorbLTjohKk6B3QzK4aG706M rQiJvPu45bgSMlW76NmsQ9TAc+H6g7fGhv95e19OVdHIM88NHyayBKF1jXVO2jMLa3Bh MdhC9vupx9irbskisOzPFNuTuW6XRA9cP7SBh7SbiU0yHh9gzQMvMG7lEr5ci5//9DrH B6GA== X-Gm-Message-State: APf1xPB829IZNX8C7MS6NqJwvyJtqsx2w0evU0TfLQ/DtLPOYjrlPMaF CUt7eSj4eDvv5pnppW2ZJq0iBX7Q X-Google-Smtp-Source: AH8x227hyCu7MGq19bpAPfmg4S69sPVYLApgHHcRUlwFj8bFPKeRTF9QTbttM4eBX0aTqaj7LjdWJg== X-Received: by 10.28.184.21 with SMTP id i21mr1815912wmf.94.1519034657069; Mon, 19 Feb 2018 02:04:17 -0800 (PST) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id l9sm42069262wrl.1.2018.02.19.02.04.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 02:04:16 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 19 Feb 2018 10:04:08 +0000 Message-Id: <20180219100408.30246-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 Subject: [Intel-gfx] [PATCH i-g-t] 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". Signed-off-by: Tvrtko Ursulin Reported-by: Chris Wilson Reviewed-by: Chris Wilson --- tests/perf_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index 82053416cbea..8d8dbe397df6 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;