public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Junjie Mao <eternal.n08@gmail.com>
Subject: Re: [PATCH] x86, boot: add hex output for debugging
Date: Fri, 31 Oct 2014 16:11:56 -0400	[thread overview]
Message-ID: <20141031201156.GJ2851@redhat.com> (raw)
In-Reply-To: <20141031174251.GM3274@tassilo.jf.intel.com>

On Fri, Oct 31, 2014 at 10:42:51AM -0700, Andi Kleen wrote:
> > > +void __puthex(unsigned long value)
> > > +{
> > > +	char alpha[2] = "0";
> > > +	int bits;
> > > +	unsigned char byte;
> > 
> > what is 'byte' for?  (unused)
> 
> Well the whole function is unused. We don't normally add unused functions
> to the code because they bitrot too easily.

I think this is useful. I had to write similar code for printing out
values during early boot.

May be we can print some values if CONFIG_X86_VERBOSE_BOOTUP=y.
That way it will not be an unused code and others can reuse it easily
to print additional data during debugging.

Thanks
Vivek

  reply	other threads:[~2014-10-31 20:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 16:20 [PATCH] x86, boot: add hex output for debugging Kees Cook
2014-10-31 17:19 ` Randy Dunlap
2014-10-31 17:42   ` Andi Kleen
2014-10-31 20:11     ` Vivek Goyal [this message]
2014-10-31 20:15       ` H. Peter Anvin
2014-10-31 20:33 ` josh
2014-10-31 20:55   ` Kees Cook
2014-10-31 23:56     ` Josh Triplett

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=20141031201156.GJ2851@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eternal.n08@gmail.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox