lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] x86: fix output of show_stack_log_lvl()
From
Date
On Fri, 2015-02-20 at 10:51 -0800, Linus Torvalds wrote:
> On Fri, Feb 20, 2015 at 10:03 AM, Joe Perchens <joe@perches.com> wrote:
> >
> > True. Also fix the pr_debug/dev_dbg cases
> > like drivers/dma/ppc4xx/adma.c:
>
> Yup, that's just garbage, and doesn't actually do what is intended.
>
> Also, rather than
>
> pr_debug("\n%s(%d):\nsrc: ", __func__, id);
> for (i = 0; i < src_cnt; i++)
> pr_debug("\t0x%016llx ", src[i]);
> ...
>
> t should probably just use
>
> pr_debug("%s(%d):\n", __func__, id);
> pr_debug("%src: %*phN\n", src_cnt*sizeof(*src), src);
>
> or similar. Yes, that will just print out the byte-stream rather than
> do it in chunkcs of 64-bit entries, but..

That won't work for > 64 byte output.

This would probably be better:

print_hex_dump_debug("src: ", DUMP_PREFIX_OFFSET, 16, sizeof(*src),
src, src_cnt * sizeof(*src), false);




\
 
 \ /
  Last update: 2015-02-20 20:41    [W:0.048 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site