intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/7] Fix a bunch of printf types
@ 2015-12-14 20:15 ville.syrjala
  2015-12-14 20:15 ` [PATCH i-g-t 2/7] tests/gem_mmap_gtt: Deal with tile sizes on gen2/3 ville.syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: ville.syrjala @ 2015-12-14 20:15 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

igt_kms.c: In function ‘igt_crtc_set_background’:
igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
  LOG(display, "%s.%d: crtc_set_background(%lu)\n",
  ^
intel_firmware_decode.c: In function ‘csr_open’:
intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=]
  printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
  ^
intel_gpu_top.c: In function ‘main’:
intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
          stats[i] - last_stats[i]);
          ^
hsw_compute_wrpll.c: In function ‘main’:
hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
   igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
   ^
gem_gtt_hog.c: In function ‘__real_main155’:
gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
  igt_info("Time to execute %lu children:  %7.3fms\n",
  ^
kms_flip.c: In function ‘run_test_step’:
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=]
   igt_assert_f(end - start > 0.9 * frame_time(o) &&
   ^
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=]
kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’:
kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=]
   igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
   ^
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_kms.c                    |  2 +-
 tests/gem_gtt_hog.c              |  2 +-
 tests/kms_flip.c                 | 20 ++++++++++----------
 tests/kms_frontbuffer_tracking.c |  2 +-
 tools/hsw_compute_wrpll.c        |  2 +-
 tools/intel_firmware_decode.c    |  3 ++-
 tools/intel_gpu_top.c            |  2 +-
 7 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5d5a95c20106..497118afe52a 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1937,7 +1937,7 @@ void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background)
 {
 	igt_display_t *display = pipe->display;
 
-	LOG(display, "%s.%d: crtc_set_background(%lu)\n",
+	LOG(display, "%s.%d: crtc_set_background(%"PRIx64")\n",
 	    kmstest_pipe_name(pipe->pipe),
 	    pipe->pipe, background);
 
diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c
index 7ca7d12d96f1..365b43ee44ab 100644
--- a/tests/gem_gtt_hog.c
+++ b/tests/gem_gtt_hog.c
@@ -174,6 +174,6 @@ igt_simple_main
 	igt_waitchildren();
 	gettimeofday(&end, NULL);
 
-	igt_info("Time to execute %lu children:		%7.3fms\n",
+	igt_info("Time to execute %zu children:		%7.3fms\n",
 		 ARRAY_SIZE(children), elapsed(&start, &end) / 1000);
 }
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index a3acc3dd28e8..750a1882dc3c 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -132,11 +132,11 @@ struct event_state {
 static void dump_event_state(const struct event_state *es)
 {
 	igt_debug("name = %s\n"
-		  "last_ts = %lu.%lu usec\n"
-		  "last_received_ts = %lu.%lu usec\n"
+		  "last_ts = %ld.%ld usec\n"
+		  "last_received_ts = %ld.%ld usec\n"
 		  "last_seq = %u\n"
-		  "current_ts = %lu.%lu usec\n"
-		  "current_received_ts = %lu.%lu usec\n"
+		  "current_ts = %ld.%ld usec\n"
+		  "current_received_ts = %ld.%ld usec\n"
 		  "current_seq = %u\n"
 		  "count = %u\n"
 		  "seq_step = %d\n",
@@ -644,8 +644,8 @@ static void check_state(struct test_output *o, struct event_state *es)
 	timersub(&es->current_ts, &es->current_received_ts, &diff);
 	if (!analog_tv_connector(o)) {
 		igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),
-			     "%s ts delayed for too long: %is, %iusec\n",
-			     es->name, (int)diff.tv_sec, (int)diff.tv_usec);
+			     "%s ts delayed for too long: %lds, %ldusec\n",
+			     es->name, diff.tv_sec, diff.tv_usec);
 
 	}
 
@@ -655,9 +655,9 @@ static void check_state(struct test_output *o, struct event_state *es)
 	timersub(&es->current_ts, &es->last_received_ts, &diff);
 	igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <),
 		     "%s ts before the %s was issued!\n"
-		     "timerdiff %is, %ius\n",
+		     "timerdiff %lds, %ldusec\n",
 		     es->name, es->name,
-		     (int) diff.tv_sec, (int) diff.tv_usec);
+		     diff.tv_sec, diff.tv_usec);
 
 	/* check only valid if no modeset happens in between, that increments by
 	 * (1 << 23) on each step. This bounding matches the one in
@@ -688,8 +688,8 @@ static void check_state(struct test_output *o, struct event_state *es)
 
 		igt_assert_f(fabs((((double) diff.tv_usec) - usec_interflip) /
 				  usec_interflip) <= 0.005,
-			     "inter-%s ts jitter: %is, %ius\n",
-			     es->name, (int) diff.tv_sec, (int) diff.tv_usec);
+			     "inter-%s ts jitter: %lds, %ldusec\n",
+			     es->name, diff.tv_sec, diff.tv_usec);
 
 		igt_assert_f(es->current_seq == es->last_seq + o->seq_step,
 			     "unexpected %s seq %u, expected %u\n",
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 23c2b0658474..e7acc7cabbed 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1361,7 +1361,7 @@ static void setup_sink_crc(void)
 	else if (rc == SINK_CRC_SIZE)
 		sink_crc.supported = true;
 	else
-		igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
+		igt_info("Unexpected sink CRC error, rc=:%zd errno:%d %s\n",
 			 rc, errno_, strerror(errno_));
 }
 
diff --git a/tools/hsw_compute_wrpll.c b/tools/hsw_compute_wrpll.c
index e27cc349e630..6c85c07c77c4 100644
--- a/tools/hsw_compute_wrpll.c
+++ b/tools/hsw_compute_wrpll.c
@@ -642,7 +642,7 @@ int main(void)
 
 		wrpll_compute_rnp(ref->clock, &r2, &n2, &p);
 		igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
-			      "Computed value differs for %li Hz:\n""  Reference: (%u,%u,%u)\n""  Computed:  (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p);
+			      "Computed value differs for %"PRId64" Hz:\n""  Reference: (%u,%u,%u)\n""  Computed:  (%u,%u,%u)\n", (int64_t)ref->clock * 1000, ref->r2, ref->n2, ref->p, r2, n2, p);
 	}
 
 	return 0;
diff --git a/tools/intel_firmware_decode.c b/tools/intel_firmware_decode.c
index ae6e02c4566c..61ce3a531165 100644
--- a/tools/intel_firmware_decode.c
+++ b/tools/intel_firmware_decode.c
@@ -25,6 +25,7 @@
  */
 
 #include <fcntl.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -166,7 +167,7 @@ static void csr_open(csr_t *ctx, const char *filename)
 			 ctx->fd, 0);
 	igt_fail_on_f(ctx->base == MAP_FAILED, "Couldn't mmap %s\n", filename);
 
-	printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
+	printf("Firmware: %s (%"PRId64" bytes)\n", filename, (int64_t)st.st_size);
 
 	ctx->css_header = (struct intel_css_header *)ctx->base;
 	ctx->package_header = (struct intel_package_header *)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index b5cfda043dd9..4f327c6daf6b 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -679,7 +679,7 @@ int main(int argc, char **argv)
 
 			for (i = 0; i < MAX_NUM_TOP_BITS; i++) {
 				if (i < STATS_COUNT && HAS_STATS_REGS(devid)) {
-					fprintf(output, "%lu\t",
+					fprintf(output, "%"PRIu64"\t",
 						   stats[i] - last_stats[i]);
 					last_stats[i] = stats[i];
 				}
-- 
2.4.10

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2015-12-16 11:11 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 20:15 [PATCH i-g-t 1/7] Fix a bunch of printf types ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 2/7] tests/gem_mmap_gtt: Deal with tile sizes on gen2/3 ville.syrjala
2015-12-14 21:52   ` Chris Wilson
2015-12-15 20:37     ` Ville Syrjälä
2015-12-15 20:51   ` Paulo Zanoni
2015-12-15 21:08     ` Ville Syrjälä
2015-12-15 21:19       ` Paulo Zanoni
2015-12-15 21:30         ` Ville Syrjälä
2015-12-14 20:15 ` [PATCH i-g-t 3/7] tests/gem_mmap_gtt: Add progress indicators ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 4/7] tests/gem_mmap_gtt: Make the small-bo tiling tests work on old platforms ville.syrjala
2015-12-14 20:49   ` Chris Wilson
2015-12-14 20:54     ` Chris Wilson
2015-12-15  9:41       ` Ville Syrjälä
2015-12-15  9:57         ` Chris Wilson
2015-12-15 10:57           ` Ville Syrjälä
2015-12-15 11:16             ` Chris Wilson
2015-12-15 11:29               ` Ville Syrjälä
2015-12-15 12:01                 ` Ville Syrjälä
2015-12-15 12:30                   ` Chris Wilson
2015-12-16 10:46                     ` Daniel Vetter
2015-12-16 11:11                       ` Chris Wilson
2015-12-14 20:15 ` [PATCH i-g-t 5/7] lib/debugfs: Read the crc frame counter as hex ville.syrjala
2015-12-15 12:03   ` Morton, Derek J
2015-12-15 12:46     ` Ville Syrjälä
2015-12-14 20:15 ` [PATCH i-g-t 6/7] tests/kms_flip: Increase TEST_TS_CONT max seq difference to 150 ville.syrjala
2015-12-16 10:49   ` Daniel Vetter
2015-12-14 20:15 ` [PATCH i-g-t 7/7] tests/kms_pipe_crc_basic: Use igt_assert_eq() to see the failing frame counts ville.syrjala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).