linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/powerpc/boot/devtree.c: use %pM to show MAC address
Date: Thu, 31 Dec 2009 15:49:26 +1100	[thread overview]
Message-ID: <20091231044926.GC18358@brick.ozlabs.ibm.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE19090200F65E@mi8nycmail19.Mi8.com>

On Wed, Dec 30, 2009 at 02:30:39PM -0500, H Hartley Sweeten wrote:

> Use the %pM kernel extension to display the MAC address.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> 
> ---
> 
> diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
> index a7e21a3..a2f07a5 100644
> --- a/arch/powerpc/boot/devtree.c
> +++ b/arch/powerpc/boot/devtree.c
> @@ -93,10 +93,7 @@ void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr)
>  	void *devp = find_node_by_alias(alias);
>  
>  	if (devp) {
> -		printf("%s: local-mac-address <-"
> -		       " %02x:%02x:%02x:%02x:%02x:%02x\n\r", alias,
> -		       addr[0], addr[1], addr[2],
> -		       addr[3], addr[4], addr[5]);
> +		printf("%s: local-mac-address <- %pM\n\r", alias, addr);

Nak - this isn't the kernel, this is a separate program, namely the
bootwrapper that decompresses the kernel image, and it has its own
printf (not printk) implementation in arch/powerpc/boot/stdio.c, which
doesn't understand the %pX extensions (and I don't see any good reason
to make it do so).

Paul.

  reply	other threads:[~2009-12-31  4:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 19:30 [PATCH] arch/powerpc/boot/devtree.c: use %pM to show MAC address H Hartley Sweeten
2009-12-31  4:49 ` Paul Mackerras [this message]
2009-12-31 14:33   ` H Hartley Sweeten

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=20091231044926.GC18358@brick.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).