public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/27] net: new utility functions for working with enetaddr's
Date: Mon, 16 Feb 2009 19:20:38 -0500	[thread overview]
Message-ID: <200902161920.39745.vapier@gentoo.org> (raw)
In-Reply-To: <20090217001331.64ABF832E893@gemini.denx.de>

On Monday 16 February 2009 19:13:31 Wolfgang Denk wrote:
> Dear Mike,
>
> In message <200902161900.49096.vapier@gentoo.org> you wrote:
> > > Hm... Linux has a printk() format specifier for MAC addresses. Sounds
> > > like a clever idea to me. Maybe we should borrow that code?
> >
> > it does eh ?  that certainly sounds a lot better than str_enetaddr() as
> > every place i changed to use it was in a printf() string.  where in the
> > kernel is that code ?  i looked in lib/vsprintf.c but couldnt find it.
>
> But it is in lib/vsprintf.c:

apparently it's new to 2.6.29 ... i'm actively working/looking at 2.6.28.x 
which doesnt have 'M'.

>  ...
>  644 /*
>  645  * Show a '%p' thing.  A kernel extension is that the '%p' is followed
>  646  * by an extra set of alphanumeric characters that are extended format
>  647  * specifiers.
>  648  *
>  649  * Right now we handle:
>  650  *
>  651  * - 'F' For symbolic function descriptor pointers
>  652  * - 'S' For symbolic direct pointers
>  653  * - 'R' For a struct resource pointer, it prints the range of
>  654  *       addresses (not the name nor the flags)
>  655  * - 'M' For a 6-byte MAC address, it prints the address in the
>  656  *       usual colon-separated hex notation
>  657  * - 'I' [46] for IPv4/IPv6 addresses printed in the usual way
> (dot-separated 658  *       decimal for v4 and colon separated
> network-order 16 bit hex for v6) 659  * - 'i' [46] for 'raw' IPv4/IPv6
> addresses, IPv6 omits the colons, IPv4 is 660  *       currently the same
>  ...
>
> So it's actually printk("%pM", ...);

so do you want to go the %pM route (to make u-boot/linux code sharing easier) 
or move over only %M ?
-mike

  reply	other threads:[~2009-02-17  0:20 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-14  7:22 [U-Boot] [PATCH 00/27] standardize mac address handling in u-boot Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 01/27] net: new utility functions for working with enetaddr's Mike Frysinger
2009-02-16 22:28   ` Wolfgang Denk
2009-02-17  0:00     ` Mike Frysinger
2009-02-17  0:13       ` Wolfgang Denk
2009-02-17  0:20         ` Mike Frysinger [this message]
2009-02-17  0:26           ` Scott Wood
2009-02-17  0:29           ` Wolfgang Denk
2009-02-17  0:37             ` Mike Frysinger
2009-02-17  7:31               ` Wolfgang Denk
2009-02-14  7:22 ` [U-Boot] [PATCH 02/27] doc/README.enetaddr: document proper MAC usage Mike Frysinger
2009-02-16 22:38   ` Wolfgang Denk
2009-02-17  0:12     ` Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 03/27] Blackfin: bfin_mac: force boards to setup the MAC themselves Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 04/27] net: get mac address from environment and use eth util funcs Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 05/27] bdinfo: get mac address from environment Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 06/27] bootvx: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 07/27] lynxkdi: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 08/27] nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr() Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 09/27] AmigaOneG3SE/enet: get mac address from environment Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 10/27] boards: " Mike Frysinger
2009-02-16 22:46   ` Wolfgang Denk
2009-02-16 23:55     ` Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 11/27] drivers/net/: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 12/27] bcm570x: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 13/27] cs8900: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 14/27] sh_eth: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 15/27] lan91c96/smc91111/smc911x: " Mike Frysinger
2009-02-14  7:22 ` [U-Boot] [PATCH 16/27] cpu/: " Mike Frysinger
2009-02-16 22:52   ` Wolfgang Denk
2009-02-16 23:56     ` Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 17/27] npe: " Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 18/27] lib_*/board.c: do not initialize bi_enet*addr in global data Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 19/27] nx823: get mac address from environment Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 20/27] arm: " Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 21/27] cmc_pu2: " Mike Frysinger
2009-02-16 22:56   ` Wolfgang Denk
2009-02-17  0:03     ` Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 22/27] pcs440ep: get mac address from environment and move load_sernum_ethaddr() to board init Mike Frysinger
2009-02-16 22:57   ` Wolfgang Denk
2009-02-17  0:05     ` Mike Frysinger
2009-02-17  0:16       ` Wolfgang Denk
2009-02-17  0:22         ` Mike Frysinger
2009-02-17  0:31           ` Wolfgang Denk
2009-02-17 13:42             ` Stefan Roese
2009-02-18 22:17               ` Mike Frysinger
2009-02-18 22:36                 ` Wolfgang Denk
2009-02-18 22:41                   ` Ben Warren
2009-02-18 22:49                   ` Mike Frysinger
2009-02-18 22:54                     ` Wolfgang Denk
2009-02-19  0:06                     ` Wolfgang Denk
2009-02-19  1:45                       ` Mike Frysinger
2009-02-19 12:12                         ` Wolfgang Denk
2009-02-19 12:31                           ` Jean-Christophe PLAGNIOL-VILLARD
2009-02-19 12:52                           ` Wolfgang Denk
2009-02-19 13:08                         ` Wolfgang Denk
2009-02-14  7:23 ` [U-Boot] [PATCH 23/27] kup4k/kup4x: rename load_sernum_ethaddr() to kup_load_sernum_ethaddr() Mike Frysinger
2009-02-16 22:58   ` Wolfgang Denk
2009-02-14  7:23 ` [U-Boot] [PATCH 24/27] tqm8xx: rename load_sernum_ethaddr() to tqc_load_sernum_ethaddr() Mike Frysinger
2009-02-16 22:58   ` Wolfgang Denk
2009-02-14  7:23 ` [U-Boot] [PATCH 25/27] ppc: do not initialize bi_enet*addr in global data Mike Frysinger
2009-02-14  7:23 ` [U-Boot] [PATCH 26/27] drop now unused load_sernum_ethaddr() function Mike Frysinger
2009-02-14  9:22   ` Jean-Christophe PLAGNIOL-VILLARD
2009-02-14 18:03     ` Mike Frysinger
2009-02-16 22:58   ` Wolfgang Denk
2009-02-14  7:23 ` [U-Boot] [PATCH 27/27] remove bi_enet*addr from global data for all arches Mike Frysinger
2009-02-16 18:16   ` Scott Wood
2009-02-16 18:57     ` Mike Frysinger
2009-02-16 19:00       ` Scott Wood
2009-02-16 19:29         ` Mike Frysinger
2009-02-16 19:47           ` Wolfgang Denk
2009-02-16 19:59             ` Mike Frysinger
2009-02-16 20:14               ` Wolfgang Denk
2009-02-16 20:49                 ` Mike Frysinger
2009-02-16 20:54                   ` Scott Wood
2009-02-16 21:13                     ` Mike Frysinger
2009-02-16 21:03                   ` Wolfgang Denk
2009-02-16 21:18                     ` Mike Frysinger
2009-02-16 23:13                       ` Wolfgang Denk
2009-02-17  0:18                         ` Mike Frysinger
2009-02-17  0:27                           ` Wolfgang Denk
2009-02-17  1:49                           ` Kim Phillips
2009-02-17  3:24                             ` Mike Frysinger
2009-02-16 19:24       ` Wolfgang Denk

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=200902161920.39745.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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