Re: mmotm 2013-01-18-15-48 uploaded (sched/stats.c)

From: Randy Dunlap
Date: Tue Jan 22 2013 - 13:48:22 EST


On 01/22/13 08:10, Nathan Zimmer wrote:
> On Sat, Jan 19, 2013 at 11:39:13AM -0800, Randy Dunlap wrote:
>> On 01/18/13 15:49, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
>>> The mm-of-the-moment snapshot 2013-01-18-15-48 has been uploaded to
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> mmotm-readme.txt says
>>>
>>> README for mm-of-the-moment:
>>>
>>> http://www.ozlabs.org/~akpm/mmotm/
>>>
>>> This is a snapshot of my -mm patch queue. Uploaded at random hopefully
>>> more than once a week.
>>>
>>
>> on i386 or x86_64:
>>
>> kernel/sched/stats.c:31:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>>
>>
>>
>> --
>> ~Randy
>
> Sorry about that.
> Here is the correction.
>
> From c832132ade12e28cd09d3c13d412fc14a7b9ab87 Mon Sep 17 00:00:00 2001
> From: Nathan Zimmer <nzimmer@xxxxxxx>
> Date: Tue, 22 Jan 2013 09:09:17 -0600
> Subject: [PATCH] on i386 or x86_64:
>
> kernel/sched/stats.c:31:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>
> Signed-off-by: Nathan Zimmer <nzimmer@xxxxxxx>

Thanks.

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>


> ---
> kernel/sched/stats.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
> index bae2757..3cbfc46 100644
> --- a/kernel/sched/stats.c
> +++ b/kernel/sched/stats.c
> @@ -25,14 +25,13 @@ static int show_schedstat(struct seq_file *seq, void *v)
> seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION);
> seq_printf(seq, "timestamp %lu\n", jiffies);
> } else {
> -
> - cpu = (unsigned long)(v - 2);
> -
> - struct rq *rq = cpu_rq(cpu);
> + struct rq *rq;
> #ifdef CONFIG_SMP
> struct sched_domain *sd;
> int dcount = 0;
> #endif
> + cpu = (unsigned long)(v - 2);
> + rq = cpu_rq(cpu);
>
> /* runqueue-specific stats */
> seq_printf(seq,
>


--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/