All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: David Daney <ddaney.cavm@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH] iqrdomain: Improve formatting in debugfs.
Date: Thu, 12 Apr 2012 14:46:17 -0600	[thread overview]
Message-ID: <CACxGe6uiGhVC-q5WP_DH8P9rak0rQZsaLFf1DWra4AtsCtK05g@mail.gmail.com> (raw)
In-Reply-To: <4F873D5F.5020901@gmail.com>

On Thu, Apr 12, 2012 at 2:38 PM, David Daney <ddaney.cavm@gmail.com> wrote:
> On 04/12/2012 12:20 PM, Andreas Schwab wrote:
>>
>> Grant Likely<grant.likely@secretlab.ca>  writes:
>>
>>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>>> index 9310a8d..eb05e40 100644
>>> --- a/kernel/irq/irqdomain.c
>>> +++ b/kernel/irq/irqdomain.c
>>> @@ -643,8 +643,8 @@ static int virq_debug_show(struct seq_file *m, void
>>> *private)
>>>        void *data;
>>>        int i;
>>>
>>> -       seq_printf(m, "%-5s  %-7s  %-15s  %-18s  %s\n", "virq", "hwirq",
>>> -                     "chip name", "chip data", "domain name");
>>> +       seq_printf(m, "%-5s  %-7s  %-15s  %-*s  %s\n", "irq", "hwirq",
>>> +                     "chip name", 2 * sizeof(void *) + 2, "chip data",
>>> "domain name");
>>
>>
>> kernel/irq/irqdomain.c:647:9: warning: field width specifier ‘*’ expects
>> argument of type ‘int’, but argument 6 has type ‘long unsigned int’
>> [-Wformat]
>>
>
> My original patch assigned the size to an int variable and then passed that
> to the seq_printf(), thus avoiding this issue.  I suspect something like:
>
> s/2 * sizeof(void *) + 2/(int)(2 * sizeof(void *) + 2)/
>
> Would do the trick.

Yeah, I'll push out a fixup patch.

g

      reply	other threads:[~2012-04-12 20:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10  0:06 [PATCH] iqrdomain: Improve formatting in debugfs David Daney
2012-04-11  7:03 ` Grant Likely
2012-04-11  9:16   ` Andreas Schwab
2012-04-11 14:52     ` Grant Likely
2012-04-11 14:57       ` Grant Likely
2012-04-16 22:01       ` Andreas Schwab
2012-04-16 22:25         ` Grant Likely
2012-04-11 15:33   ` David Daney
2012-04-12 19:20   ` Andreas Schwab
2012-04-12 20:38     ` David Daney
2012-04-12 20:46       ` Grant Likely [this message]

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=CACxGe6uiGhVC-q5WP_DH8P9rak0rQZsaLFf1DWra4AtsCtK05g@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=benh@kernel.crashing.org \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=tglx@linutronix.de \
    /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.