From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: wli@holomorphy.com
Subject: Re: [PATCH] silence numerous size_t warnings in drivers/acpi/processor_idle.c
Date: Tue, 11 Jan 2005 12:27:24 -0800 [thread overview]
Message-ID: <41E436AC.1050004@osdl.org> (raw)
In-Reply-To: <200501111916.j0BJGq1F010042@hera.kernel.org>
Linux Kernel Mailing List wrote:
> ChangeSet 1.2334, 2005/01/11 09:21:40-08:00, wli@holomorphy.com
>
> [PATCH] silence numerous size_t warnings in drivers/acpi/processor_idle.c
>
> Multiple format -related warnings arise from size_t issues. This patch
> peppers the seq_printf()'s with 'z' qualifiers and casts to silence them all.
Does this mean that ptrdiff_t type looks same as a size_t
to printk() & seq_printf() ?
> processor_idle.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
>
> diff -Nru a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> --- a/drivers/acpi/processor_idle.c 2005-01-11 11:17:04 -08:00
> +++ b/drivers/acpi/processor_idle.c 2005-01-11 11:17:04 -08:00
> @@ -838,12 +838,12 @@
> if (!pr)
> goto end;
>
> - seq_printf(seq, "active state: C%d\n"
> + seq_printf(seq, "active state: C%zd\n"
> "max_cstate: C%d\n"
> "bus master activity: %08x\n",
> pr->power.state ? pr->power.state - pr->power.states : 0,
> max_cstate,
> - pr->power.bm_activity);
> + (unsigned)pr->power.bm_activity);
>
> seq_puts(seq, "states:\n");
>
> @@ -872,14 +872,14 @@
> }
>
> if (pr->power.states[i].promotion.state)
> - seq_printf(seq, "promotion[C%d] ",
> + seq_printf(seq, "promotion[C%zd] ",
> (pr->power.states[i].promotion.state -
> pr->power.states));
> else
> seq_puts(seq, "promotion[--] ");
>
> if (pr->power.states[i].demotion.state)
> - seq_printf(seq, "demotion[C%d] ",
> + seq_printf(seq, "demotion[C%zd] ",
> (pr->power.states[i].demotion.state -
> pr->power.states));
> else
> -
--
~Randy
next parent reply other threads:[~2005-01-11 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200501111916.j0BJGq1F010042@hera.kernel.org>
2005-01-11 20:27 ` Randy.Dunlap [this message]
2005-01-11 20:36 ` [PATCH] silence numerous size_t warnings in drivers/acpi/processor_idle.c William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41E436AC.1050004@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.