lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Jan 2013 08:01:33 -0800
From:	Paul Turner <pjt@...gle.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arm-kernel@...t.infradead.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 06/19] sched/debug: fix format string for 32 bit platforms

On Fri, Jan 25, 2013 at 6:14 AM, Arnd Bergmann <arnd@...db.de> wrote:
> The type returned from atomic64_t can be either unsigned
> long or unsigned long long, depending on the architecture.
> Using a cast to unsigned long long lets us use the same
> format string for all architectures.
>
> Without this patch, building with scheduler debugging
> enabled results in:
>
> 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]
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Paul Turner <pjt@...gle.com>
> ---
>  kernel/sched/debug.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index 2cd3c1b..7ae4c4c 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -222,8 +222,8 @@ 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",
> -                       atomic64_read(&cfs_rq->tg->load_avg));
> +       SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_avg",
> +                       (unsigned long long)atomic64_read(&cfs_rq->tg->load_avg));
>         SEQ_printf(m, "  .%-30s: %lld\n", "tg_load_contrib",
>                         cfs_rq->tg_load_contrib);
>         SEQ_printf(m, "  .%-30s: %d\n", "tg_runnable_contrib",
> --
> 1.8.0
>

Looks good.

Reviewed-by: Paul Turner <pjt@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ