Subject: Re: [PATCH] net: skbuff: use _RET_IP_

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 31 May 2013 18:33:08 +0400

Hello.

On 31-05-2013 9:20, Joe Perches wrote:

>>>>      Why not "text:%#lx" as already used in this string? It's
>>>> equivalent to "0x%lx".

>>> Well, I don't know the reasoning in this case, but I'd like to note that
>>> those are not strictly equivalent.  Personally I find the formatting of 0
>>> annoying enough to avoid %#x for any value which may be 0.  It's
>>> especially bad if you try to line up things by adding leading zeros.

>> Yep, I found that 0x%lx produced the same output as %p.

> Don't use a standalone gcc compiled program to
> determine what the kernel outputs.

> lib/vsprintf.c does not output the same. (32 bit)

> The kernel output is;

> 	printk("0x%lx\n", 0x100ul)		0x100
> 	printk("%p\n", (void *)0x100ul)		00000100
> 	printk("%#p\n", (void *)0x100ul)	0x00000100

> The last one isn't used at all in kernel source. (gcc complains)
> It's always "0x%p"

     I was talking about using "%#lx", not "%#p". I don't see it in your 
example.

WBR, Sergei