Skip to content

Commit 6665931

Browse files
rddunlaptorvalds
authored andcommitted
docsrc: fix getdelays printk formats
Fix printf format type warnings (seen on alpha & ia64): Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 6 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 7 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 8 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 9 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 12 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 13 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 16 has type '__u64' Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 17 has type '__u64' Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 4 has type '__u64' Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 5 has type '__u64' Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type '__u64' Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type '__u64' Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type '__u64' Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type '__u64' Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 6 has type '__u64' Documentation/accounting/getdelays.c:236: warning: 'cmd_type' may be used uninitialized in this function Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ffab10e commit 6665931

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

‎Documentation/accounting/getdelays.c‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,28 +201,37 @@ void print_delayacct(struct taskstats *t)
201201
"RECLAIM %12s%15s\n"
202202
" %15llu%15llu\n",
203203
"count", "real total", "virtual total", "delay total",
204-
t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
205-
t->cpu_delay_total,
204+
(unsigned long long)t->cpu_count,
205+
(unsigned long long)t->cpu_run_real_total,
206+
(unsigned long long)t->cpu_run_virtual_total,
207+
(unsigned long long)t->cpu_delay_total,
206208
"count", "delay total",
207-
t->blkio_count, t->blkio_delay_total,
208-
"count", "delay total", t->swapin_count, t->swapin_delay_total,
209+
(unsigned long long)t->blkio_count,
210+
(unsigned long long)t->blkio_delay_total,
209211
"count", "delay total",
210-
t->freepages_count, t->freepages_delay_total);
212+
(unsigned long long)t->swapin_count,
213+
(unsigned long long)t->swapin_delay_total,
214+
"count", "delay total",
215+
(unsigned long long)t->freepages_count,
216+
(unsigned long long)t->freepages_delay_total);
211217
}
212218

213219
void task_context_switch_counts(struct taskstats *t)
214220
{
215221
printf("\n\nTask %15s%15s\n"
216222
" %15llu%15llu\n",
217223
"voluntary", "nonvoluntary",
218-
t->nvcsw, t->nivcsw);
224+
(unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
219225
}
220226

221227
void print_cgroupstats(struct cgroupstats *c)
222228
{
223229
printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
224-
"uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait,
225-
c->nr_running, c->nr_stopped, c->nr_uninterruptible);
230+
"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
231+
(unsigned long long)c->nr_io_wait,
232+
(unsigned long long)c->nr_running,
233+
(unsigned long long)c->nr_stopped,
234+
(unsigned long long)c->nr_uninterruptible);
226235
}
227236

228237

0 commit comments

Comments
 (0)