[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110218211551.GA7494@elte.hu>
Date: Fri, 18 Feb 2011 22:15:51 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Joe Perches <joe@...ches.com>
Cc: mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
jbeulich@...ell.com, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/debug] x86: Combine printk()s in show_regs_common()
* Joe Perches <joe@...ches.com> wrote:
> On Fri, 2011-02-18 at 21:05 +0100, Ingo Molnar wrote:
> > * Joe Perches <joe@...ches.com> wrote:
> > > Ingo, why did you choose to apply this patch instead of
> > > the alternative one I posted on the same thread?
> > Your version:
> >
> > /* Board Name is optional */
> > board = dmi_get_system_info(DMI_BOARD_NAME);
> > if (!board)
> > board = "";
> >
> > printk(KERN_CONT "\n");
> >
> > printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s %s %s%s%s\n",
> > current->pid, current->comm, print_tainted(),
> > init_utsname()->release,
> > (int)strcspn(init_utsname()->version, " "),
> > init_utsname()->version,
> > vendor, product,
> > strlen(board) ? "/" : "",
> > board);
> >
> > The 'board' fiddling and the strlen(board) check complicates things unnecessarily
> > and makes the code hard to read. Jan's version was at least simple.
>
> Perhaps you should look at the surrounding code.
> It's uses the same style as I chose for "board".
Yes, i realize that, but the strlen() trick really looks weird.
And 'weird' is not something i like seeing in essential bug reporting code.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists