From patchwork Wed Dec 30 19:30:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 41945 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id B769D1008A1 for ; Thu, 31 Dec 2009 11:41:45 +1100 (EST) Received: by ozlabs.org (Postfix) id 9D5EB1007D6; Thu, 31 Dec 2009 06:37:54 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 432 seconds by postgrey-1.32 at bilbo; Thu, 31 Dec 2009 06:37:53 EST Received: from exprod6og103.obsmtp.com (exprod6og103.obsmtp.com [64.18.1.185]) by ozlabs.org (Postfix) with SMTP id A6D801007D5 for ; Thu, 31 Dec 2009 06:37:53 +1100 (EST) Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob103.postini.com ([64.18.5.12]) with SMTP ID DSNKSzusEKIObI/OaLUX7nY3fdy8/dSrrAoU@postini.com; Wed, 30 Dec 2009 11:37:53 PST Received: from d01smtp07.Mi8.com ([172.16.1.114]) by Outbound01.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Dec 2009 14:30:37 -0500 Received: from mi8nycmail19.Mi8.com ([172.16.7.219]) by d01smtp07.Mi8.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Dec 2009 14:30:37 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: [PATCH] arch/powerpc/boot/devtree.c: use %pM to show MAC address Date: Wed, 30 Dec 2009 14:30:39 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] arch/powerpc/boot/devtree.c: use %pM to show MAC address Thread-Index: AcqJhpFX52mm8R2tQHCy6qV3E2wwNA== From: "H Hartley Sweeten" To: , X-OriginalArrivalTime: 30 Dec 2009 19:30:37.0339 (UTC) FILETIME=[9051E6B0:01CA8986] X-Mailman-Approved-At: Thu, 31 Dec 2009 11:41:38 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten 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); setprop(devp, "local-mac-address", addr, 6); } @@ -108,10 +105,7 @@ void dt_fixup_mac_address(u32 index, const u8 *addr) (void*)&index, sizeof(index)); if (devp) { - printf("ENET%d: local-mac-address <-" - " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index, - addr[0], addr[1], addr[2], - addr[3], addr[4], addr[5]); + printf("ENET%d: local-mac-address <- %pM\n\r", index, addr); setprop(devp, "local-mac-address", addr, 6); }