Skip to contentSkip to conversation

sched: fix compilation warning

PATCH Superseded Cong Ding 2 participants 4 messages Dec 5, 2012 – Jan 27, 2013 Scheduler

lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 sched: fix compilation warning

the following compilation warning is caused by Commit-ID:
c566e8e9e44b72b53091da20e2dedefc730f2ee2

kernel/sched/debug.c: In function ‘print_cfs_rq’:
kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat] kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat]

where function atomic64_read returns long long int, but %ld was used in the printf

---
 kernel/sched/debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/debug.c +1 -1
index 2cd3c1b..83ec463 100644
@@ -222,7 +222,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
 			cfs_rq->runnable_load_avg);
 	SEQ_printf(m, "  .%-30s: %lld\n", "blocked_load_avg",
 			cfs_rq->blocked_load_avg);
-	SEQ_printf(m, "  .%-30s: %ld\n", "tg_load_avg",
+	SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_avg",
 			atomic64_read(&cfs_rq->tg->load_avg));
 	SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_contrib",
 			cfs_rq->tg_load_contrib);
Signature · 1 line
1.7.4.5
author
#1 lore raw

Is this patch still queued or...?

- cong

Quoted 33 lines · Cong Ding

the following compilation warning is caused by Commit-ID:
c566e8e9e44b72b53091da20e2dedefc730f2ee2

kernel/sched/debug.c: In function ‘print_cfs_rq’:
kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat] kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat]

where function atomic64_read returns long long int, but %ld was used in the printf

---
 kernel/sched/debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/debug.c +1 -2
index 2cd3c1b..83ec463 100644
@@ -222,7 +222,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
                        cfs_rq->runnable_load_avg);
        SEQ_printf(m, "  .%-30s: %lld\n", "blocked_load_avg",
                        cfs_rq->blocked_load_avg);
-       SEQ_printf(m, "  .%-30s: %ld\n", "tg_load_avg",
+       SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_avg",
                        atomic64_read(&cfs_rq->tg->load_avg));
        SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_contrib",
                        cfs_rq->tg_load_contrib);
--

1.7.4.5

#2 lore raw
Quoted 3 lines · Cong Ding

Is this patch still queued or...?

- cong

ping.
Can we get this patch or something similar merged, please?

Quoted 32 lines · Cong Ding
Quoted 31 lines

the following compilation warning is caused by Commit-ID:
c566e8e9e44b72b53091da20e2dedefc730f2ee2

kernel/sched/debug.c: In function ‘print_cfs_rq’:
kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat] kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat]

where function atomic64_read returns long long int, but %ld was used in the printf

---
 kernel/sched/debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched/debug.c +1 -2
index 2cd3c1b..83ec463 100644
@@ -222,7 +222,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
                        cfs_rq->runnable_load_avg);
        SEQ_printf(m, "  .%-30s: %lld\n", "blocked_load_avg",
                        cfs_rq->blocked_load_avg);
-       SEQ_printf(m, "  .%-30s: %ld\n", "tg_load_avg",
+       SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_avg",
                        atomic64_read(&cfs_rq->tg->load_avg));
        SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_contrib",
                        cfs_rq->tg_load_contrib);
--
Signature · 1 line
~Randy
author
#3 lore raw

PATCH RESEND 1/1 sched: fix compilation warning

the following compilation warning is caused by Commit-ID:
c566e8e9e44b72b53091da20e2dedefc730f2ee2

kernel/sched/debug.c: In function ‘print_cfs_rq’:
kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat] kernel/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat]

where function atomic64_read returns long long int, but %ld was used in the printf

---
resend because no reply for
Message-Id: <[email protected]>

 kernel/sched/debug.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/debug.c +1 -1
index 2cd3c1b..83ec463 100644
@@ -222,7 +222,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
 			cfs_rq->runnable_load_avg);
 	SEQ_printf(m, "  .%-30s: %lld\n", "blocked_load_avg",
 			cfs_rq->blocked_load_avg);
-	SEQ_printf(m, "  .%-30s: %ld\n", "tg_load_avg",
+	SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_avg",
 			atomic64_read(&cfs_rq->tg->load_avg));
 	SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_contrib",
 			cfs_rq->tg_load_contrib);
Signature · 1 line
1.7.10.4