From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Joe Perches <joe@perches.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rob Landley <rob@landley.net>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dmaengine@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] lib/vsprintf.c: add %paD format specifier for dma_addr_t types
Date: Sat, 30 Nov 2013 00:44:53 +0100 [thread overview]
Message-ID: <2554479.4o3B19tG25@avalon> (raw)
In-Reply-To: <1385763040.12210.34.camel@joe-AO722>
Hi Joe,
On Friday 29 November 2013 14:10:40 Joe Perches wrote:
> On Fri, 2013-11-29 at 14:56 +0200, Andy Shevchenko wrote:
> > On Thu, 2013-11-28 at 10:32 -0800, Joe Perches wrote:
> > > On Thu, 2013-11-28 at 13:28 +0200, user.email wrote:
> > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > >
> > > > Add the %paD format specifier for printing a dma_addr_t type, since
> > > > the
> > > > DMA address size on some platforms can vary based on build options,
> > > > regardless of the native integer type.
> > >
> > > OK, but I prefer this one because upper case is
> > > sometimes used to specify upper case only output.
> > > ala %x %X and %pUl %pUL.
> >
> > No objections.
> >
> > > https://lkml.org/lkml/2013/9/12/483
> >
> > Hmm... Still not in kernel. Do you know reason why it so?
>
> It was just for discussion and I didn't sign or push it
> to anyone else.
>
> What's slightly funny is how far back dma_addr_t printk
> discussions go.
>
> http://lkml.indiana.edu/hypermail/linux/kernel/0202.1/1221.html
>
> Anyway, if you think you're going to do a lot of
> transforms of printk("%x", dma_addr_t) with or without
> (unsigned long long) or (u64) casts, I'll submit a signed
> patch to Andrew.
>
> Let me know.
Just FYI, I've recently submitted a couple of patches that cast dma_addr_t for
printk purpose, which resulted in Andy proposing a printk format extension
instead.
> In an aside for Julia Lawall (added to cc's), I tried to
> do a spatch grep for dma_addr_t (and phys_addr_t) types
> that were cast to (unsigned long) or (u64) but I was
> unsuccessful. Is there something else I need to do?
>
> $ cat dma_addr_t.cocci
> @@
> dma_addr_t foo;
> @@
>
> * (unsigned long long)foo;
>
> $ cat t.c
> #include <linux/types.h>
> #include <linux/printk.h>
>
> int foo(dma_addr_t a)
> {
> printk("test: %llx\n", (unsigned long long)a);
> }
>
> $ spatch --all-includes --local-includes -I include/ --sp-file
> dma_addr_t.cocci t.c init_defs_builtins:
> /usr/local/share/coccinelle/standard.h
> HANDLING: t.c
> $
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-11-29 23:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 11:28 [PATCH] lib/vsprintf.c: add %paD format specifier for dma_addr_t types user.email
2013-11-28 18:32 ` Joe Perches
2013-11-29 12:56 ` Andy Shevchenko
2013-11-29 22:10 ` Joe Perches
2013-11-29 22:50 ` Lars-Peter Clausen
2013-11-29 22:58 ` Joe Perches
2013-11-29 23:44 ` Laurent Pinchart [this message]
2013-12-02 9:06 ` Andy Shevchenko
2013-12-02 9:08 ` Shevchenko, Andriy
2013-12-03 22:16 ` [PATCH -next] vsprintf: add %pad extension for dma_addr_t use Joe Perches
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=2554479.4o3B19tG25@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=joe@perches.com \
--cc=julia.lawall@lip6.fr \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
/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.