Re: [PATCH v2] x86: fix output of show_stack_log_lvl()

From: Joe Perches
Date: Fri Feb 20 2015 - 13:03:35 EST


On Fri, 2015-02-20 at 09:52 -0800, Linus Torvalds wrote:
> On Feb 20, 2015 9:40 AM, "Joe Perches" <joe@xxxxxxxxxxx> wrote:
> >
> > There are still a few dozen uses of this pattern:
> >
> > pr_info("Some message line 1\nNext line: ");
> > for (...)
> > pr_cont(" part %d", i);
> > pr_cont('\n");
>
> That, btw, is a buglet anyway.
>
> We don't really support newlines in the middle of printouts any more. We
> used to, but it for deprecated. It doesn't really work with the "printk is
> a message packet" model.
>
> Admittedly neither does the "pr_cont()" model, but pr_cont() is
> fundamentally useful, in a way that newlines in the middle are not (they
> can always just be split up, while the pr_cont() cannot generally be
> combined).
>
> So we should generally try to get rid of the newline in the middle cases.

True. Also fix the pr_debug/dev_dbg cases
like drivers/dma/ppc4xx/adma.c:

static void prep_dma_pq_dbg(int id, dma_addr_t *dst, dma_addr_t *src,
unsigned int src_cnt)
{
int i;

pr_debug("\n%s(%d):\nsrc: ", __func__, id);
for (i = 0; i < src_cnt; i++)
pr_debug("\t0x%016llx ", src[i]);
pr_debug("dst: ");
for (i = 0; i < 2; i++)
pr_debug("\t0x%016llx ", dst[i]);
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/