The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Stepan Moskovchenko <stepanm@codeaurora.org>,
	Rob Landley <rob@landley.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	George Spelvin <linux@horizon.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Andrei Emeltchenko <andrei.emeltchenko@intel.com>,
	mingo@kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] lib: vsprintf: Add %pa format specifier for phys_addr_t types
Date: Mon, 21 Jan 2013 23:52:25 -0800	[thread overview]
Message-ID: <1358841145.23968.28.camel@joe-AO722> (raw)
In-Reply-To: <1358839767.12502.44.camel@smile>

On Tue, 2013-01-22 at 09:29 +0200, Andy Shevchenko wrote:
> On Mon, 2013-01-21 at 21:47 -0800, Stepan Moskovchenko wrote: 
> > Add the %pa format specifier for printing a phys_addr_t
> > type, since the physical address size on some platforms
> > can vary based on build options, regardless of the native
> > integer type.
[]
> > diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
>  @@ -1112,6 +1113,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> >  			return netdev_feature_string(buf, end, ptr, spec);
> >  		}
> >  		break;
> > +	case 'a':
> > +		spec.flags |= SPECIAL | SMALL | ZEROPAD;
> > +		spec.field_width = sizeof(phys_addr_t) * 2;

I believe this should be:

	spec.field_width = sizeof(phys_addr_t) * 2 + 2;


  reply	other threads:[~2013-01-22  7:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  5:47 [PATCH] lib: vsprintf: Add %pa format specifier for phys_addr_t types Stepan Moskovchenko
2013-01-22  7:29 ` Andy Shevchenko
2013-01-22  7:52   ` Joe Perches [this message]
2013-01-22 21:07     ` Stepan Moskovchenko
2013-01-22 22:26 ` Geert Uytterhoeven
2013-01-23  4:14   ` Joe Perches
2013-01-24  0:37     ` Stepan Moskovchenko
2013-01-23  0:14 ` [PATCH v2] " Stepan Moskovchenko
2013-01-24 23:07   ` Andrew Morton
2013-02-07  4:39   ` Rob Landley
2013-02-07  6:39     ` Geert Uytterhoeven

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=1358841145.23968.28.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrei.emeltchenko@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mingo@kernel.org \
    --cc=rob@landley.net \
    --cc=sboyd@codeaurora.org \
    --cc=stepanm@codeaurora.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox