From: Tvrtko Ursulin <tursulin@ursulin.net>
To: igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t v2] perf_pmu: Fix some compile warnings with old compilers / 32-bit builds
Date: Mon, 19 Feb 2018 10:17:02 +0000 [thread overview]
Message-ID: <20180219101702.30707-1-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <151903517768.2041.4670562671355178120@mail.alporthouse.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
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 <tvrtko.ursulin@intel.com>
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
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);
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2018-02-19 10:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 10:04 [PATCH i-g-t] perf_pmu: Fix some compile warnings with old compilers / 32-bit builds Tvrtko Ursulin
2018-02-19 10:12 ` Chris Wilson
2018-02-19 10:17 ` Tvrtko Ursulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180219101702.30707-1-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox