Thread (5 messages) 5 messages, 2 authors, 2021-03-04

Re: [PATCH rt-tests v1 2/2] cyclicdeadline.c: Fix printf format specifier

From: John Kacur <jkacur@redhat.com>
Date: 2021-03-04 00:22:05


On Fri, 19 Feb 2021, Daniel Wagner wrote:
quoted hunk ↗ jump to hunk
The fields are not uint64 just longs, update the printf format
specifiers.

Signed-off-by: Daniel Wagner <redacted>
---
 src/sched_deadline/cyclicdeadline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index ed3c960d9916..bb8ffc3642bc 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -978,9 +978,9 @@ static void write_stats(FILE *f, void *data)
 	for (i = 0; i < nr_threads; i++) {
 		s = &sd[i].stat;
 		fprintf(f, "    \"%u\": {\n", i);
-		fprintf(f, "	 \"cycles\": %" PRIu64 ",\n", s->cycles);
-		fprintf(f, "	 \"min\": %" PRIu64 ",\n", s->min);
-		fprintf(f, "	 \"max\": %" PRIu64 ",\n", s->max);
+		fprintf(f, "	 \"cycles\": %ld,\n", s->cycles);
+		fprintf(f, "	 \"min\": %ld,\n", s->min);
+		fprintf(f, "	 \"max\": %ld\n", s->max);
 		fprintf(f, "	 \"avg\": %.2f\n", s->avg/s->cycles);
 		fprintf(f, "    }%s\n", i == nr_threads - 1 ? "" : ",");
 	}
-- 
2.30.0
    Also Reported-by: Signed-off-by: Christian Eggers [off-list ref]
    Signed-off-by: John Kacur [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help