Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-24 Thread Joe Perches
On Wed, 2007-09-19 at 12:54 -0700, David Miller wrote: > Applied to net-2.6.24, thanks Joe! Here is a patch that adds some type safety to print_mac by using a struct print_mac_buf * instead of char *. It also reduces the defconfig vmlinux size by 8 bytes. Signed-off-by: Joe Perches <[EMAIL PROT

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-19 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Wed, 19 Sep 2007 11:50:54 -0700 > On Wed, 2007-09-19 at 11:11 -0700, David Miller wrote: > > Can you just extract out one single patch that does the MAC_FMT change > > and get that to me somehow? > > Signed-off-by: Joe Perches <[EMAIL PROTECTED]> > >

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-19 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Tue, 18 Sep 2007 21:50:01 -0700 > I rebased against yesterday's net-2.6.24 > > Please pull from: > > git://repo.or.cz/linux-2.6/trivial-mods.git net-2.6.24-fordave You didn't "rebase" you "merged" and this makes your tree a complete mess. When you do

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-18 Thread Joe Perches
On Mon, 2007-09-17 at 19:14 -0700, Joe Perches wrote: > On Mon, 2007-09-17 at 19:05 -0700, David Miller wrote: > > Anyways, it would indeed help if you could rebase the patch > > against net-2.6.24 It would save me a ton of time. > > I'll rebase it tomorrow against whatever's in > your current ne

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-17 Thread Joe Perches
On Mon, 2007-09-17 at 19:05 -0700, David Miller wrote: > Anyways, it would indeed help if you could rebase the patch > against net-2.6.24 It would save me a ton of time. I'll rebase it tomorrow against whatever's in your current net-2.6.24. cheers, Joe - To unsubscribe from this list: send the

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-17 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Fri, 14 Sep 2007 12:41:48 -0700 > David? Did you ever get a chance to look at this? > Do you want me to rebase it against your newer net-2.4.26? > > http://repo.or.cz/w/linux-2.6/trivial-mods.git How can I pull from this tree? [EMAIL PROTECTED]:~/src

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-14 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Fri, 14 Sep 2007 12:41:48 -0700 > David? Did you ever get a chance to look at this? > Do you want me to rebase it against your newer net-2.4.26? > > http://repo.or.cz/w/linux-2.6/trivial-mods.git I just got back from 2 weeks of travelling, sit tight :

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-09-14 Thread Joe Perches
David? Did you ever get a chance to look at this? Do you want me to rebase it against your newer net-2.4.26? http://repo.or.cz/w/linux-2.6/trivial-mods.git > I've inlined the include changes, but the entire patch > is quite large. (300KB) > > MAC address format changes: > > UPPER->lower case c

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Joe Perches
On Sat, 2007-09-01 at 00:32 +0200, Johannes Berg wrote: > I think you got a bit too trigger-happy: > p += sprintf(p, "key[%d] alg=CCMP key_set=%d " > -"tx_pn=%02x%02x%02x%02x%02x%02x " > -"rx_pn=%02x%02x%02x%02x%02x%02x " > +"tx_pn

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Johannes Berg
On Fri, 2007-08-31 at 15:24 -0700, Joe Perches wrote: > On Sat, 2007-09-01 at 00:21 +0200, Johannes Berg wrote: > > On Fri, 2007-08-31 at 15:16 -0700, Joe Perches wrote: > > > please pull from: > > > git pull git://repo.or.cz/linux-2.6/trivial-mods.git net-2.6.24-print_mac > > got a gitweb for that

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Johannes Berg
On Fri, 2007-08-31 at 15:24 -0700, Joe Perches wrote: > On Sat, 2007-09-01 at 00:21 +0200, Johannes Berg wrote: > > On Fri, 2007-08-31 at 15:16 -0700, Joe Perches wrote: > > > please pull from: > > > git pull git://repo.or.cz/linux-2.6/trivial-mods.git net-2.6.24-print_mac > > got a gitweb for that

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Joe Perches
On Sat, 2007-09-01 at 00:21 +0200, Johannes Berg wrote: > On Fri, 2007-08-31 at 15:16 -0700, Joe Perches wrote: > > please pull from: > > git pull git://repo.or.cz/linux-2.6/trivial-mods.git net-2.6.24-print_mac > got a gitweb for that somewhere? Does this work for you? http://repo.or.cz/w/linux-

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Johannes Berg
On Fri, 2007-08-31 at 15:16 -0700, Joe Perches wrote: > please pull from: > git pull git://repo.or.cz/linux-2.6/trivial-mods.git net-2.6.24-print_mac got a gitweb for that somewhere? johannes signature.asc Description: This is a digitally signed message part

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-31 Thread Joe Perches
On Tue, 2007-08-28 at 14:22 -0700, David Miller wrote: > From: Joe Perches <[EMAIL PROTECTED]> > > Option 2: > > DECLARE_MAC_BUF(mac); > > printk("%s", print_mac(mac, dev->dev_addr)); > I'm slightly leaning towards 2. Here are the patches for this conversion. Compiled successfully x86, d

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-29 Thread Michael Buesch
On Wednesday 29 August 2007 00:54:19 David Miller wrote: > From: Michael Buesch <[EMAIL PROTECTED]> > Date: Tue, 28 Aug 2007 16:48:44 +0200 > > > On Monday 27 August 2007 23:11:50 David Miller wrote: > > > From: Joe Perches <[EMAIL PROTECTED]> > > > Date: Mon, 27 Aug 2007 13:57:42 -0700 > > > > >

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread David Miller
From: Michael Buesch <[EMAIL PROTECTED]> Date: Tue, 28 Aug 2007 16:48:44 +0200 > On Monday 27 August 2007 23:11:50 David Miller wrote: > > From: Joe Perches <[EMAIL PROTECTED]> > > Date: Mon, 27 Aug 2007 13:57:42 -0700 > > > > > On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > > > > From:

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Tue, 28 Aug 2007 14:30:33 -0700 > I thought you said Johannes' patch was reverted, > but so far it seems not. > http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.24.git;a=summary > > Against what tree do you want a patch? > No hurry of course. I'

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread Joe Perches
On Tue, 2007-08-28 at 14:22 -0700, David Miller wrote: > > Option 2: > > DECLARE_MAC_BUF(mac); > > printk("%s", print_mac(mac, dev->dev_addr)); > Between them, 1 and 2 seem roughly the same, but I'm slightly leaning > towards 2. 2 it is then. I thought you said Johannes' patch was reverte

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Tue, 28 Aug 2007 14:12:00 -0700 > I've forward ported what I had. > > Option 1: > DECLARE_MAC_BUF(var); > printk(MAC_FMT, MAC_ARG(var, dev->dev_addr)); > > perhaps it looks nicer to remove the MAC_FMT and defines. > > Option 2: > DEC

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread Joe Perches
On Mon, 2007-08-27 at 14:37 -0700, David Miller wrote: > From: Joe Perches <[EMAIL PROTECTED]> > > My original patch had the equivalent of > > char* print_mac(char* buf, const char* addr) { > > sprintf(buf,"%02x:...", addr[0]...) > > return buf; > > } > > and used: >

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread Michael Buesch
On Monday 27 August 2007 23:11:50 David Miller wrote: > From: Joe Perches <[EMAIL PROTECTED]> > Date: Mon, 27 Aug 2007 13:57:42 -0700 > > > On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > > > From: Johannes Berg <[EMAIL PROTECTED]> > > > Date: Mon, 27 Aug 2007 12:54:09 +0200 > > > > #defi

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-28 Thread Johannes Berg
On Mon, 2007-08-27 at 14:26 -0700, Joe Perches wrote: > char* print_mac(char* buf, const char* addr) { > sprintf(buf,"%02x:...", addr[0]...) > return buf; > } > > and used: > > DECLARE_MAC_BUF(var); //same as char var[18]; > printk(MAC_FMT, MAC

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Mon, 27 Aug 2007 14:26:46 -0700 > My original patch had the equivalent of > > char* print_mac(char* buf, const char* addr) { > sprintf(buf,"%02x:...", addr[0]...) > return buf; > } > > and used: > > DECLAR

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread Joe Perches
On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > there are better approaches to this, > how about just calling: > > print_mac(dev->dev_addr); > > Sure, we'll have to split up printk() calls, but in the end it's > likely still smaller and better. And I think it's much cleaner > than

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Mon, 27 Aug 2007 13:57:42 -0700 > On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > > From: Johannes Berg <[EMAIL PROTECTED]> > > Date: Mon, 27 Aug 2007 12:54:09 +0200 > > > #define MAC_FMT "%s" > > > #define MAC_ARG(a) ({char __buf[18]; print_mac

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread Stephen Hemminger
On Mon, 27 Aug 2007 13:57:42 -0700 Joe Perches <[EMAIL PROTECTED]> wrote: > On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > > From: Johannes Berg <[EMAIL PROTECTED]> > > Date: Mon, 27 Aug 2007 12:54:09 +0200 > > > #define MAC_FMT "%s" > > > #define MAC_ARG(a) ({char __buf[18]; print_mac(a

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread Joe Perches
On Mon, 2007-08-27 at 13:41 -0700, David Miller wrote: > From: Johannes Berg <[EMAIL PROTECTED]> > Date: Mon, 27 Aug 2007 12:54:09 +0200 > > #define MAC_FMT "%s" > > #define MAC_ARG(a) ({char __buf[18]; print_mac(a, __buf); __buf;}) > I don't think this works. $ cat test_fmt.c #include #include

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread David Miller
From: Joe Perches <[EMAIL PROTECTED]> Date: Mon, 27 Aug 2007 08:44:17 -0700 > The compound statement to hide the automatic works well. As I explained in another reply, it doesn't work well. It's undefined to reference that in-expression local variable after the expression is done being evaluated

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread David Miller
From: Johannes Berg <[EMAIL PROTECTED]> Date: Mon, 27 Aug 2007 12:54:09 +0200 > -- change macros to -- > #define MAC_FMT "%s" > #define MAC_ARG(a) ({char __buf[18]; print_mac(a, buf); __buf}) > > I'm not sure we'd want that, but at the time you said it made the kernel > significantly smaller and

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread Joe Perches
On Mon, 2007-08-27 at 12:54 +0200, Johannes Berg wrote: > Thanks for this patch though, I'd have done it otherwise. I had it, it was just a s/EUI48/MAC/ and copy/paste thing. There are also the arch, drivers/[^net], and net directories that have a few of these. The patch also added the missing "

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-27 Thread Johannes Berg
On Sat, 2007-08-25 at 17:09 -0700, Joe Perches wrote: > > @@ -747,22 +741,15 @@ static int ariadne_rx(struct net_device *dev) > skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], > pkt_len); > skb->protocol=eth_type_trans(skb,dev); > #if 0 > (int)skb->len); > +{ >

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-24 Thread David Miller
From: "John W. Linville" <[EMAIL PROTECTED]> Date: Thu, 23 Aug 2007 13:08:30 -0400 > On Thu, Aug 23, 2007 at 06:12:00PM +0200, Johannes Berg wrote: > > On Thu, 2007-08-23 at 09:01 -0700, Joe Perches wrote: > > > There are also several different uses of the equivalent of > > > > > > printk("%02x

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-23 Thread John W. Linville
On Thu, Aug 23, 2007 at 06:12:00PM +0200, Johannes Berg wrote: > On Thu, 2007-08-23 at 09:01 -0700, Joe Perches wrote: > > There are also several different uses of the equivalent of > > > > printk("%02x",addr[0]) > > for (i=1; i<6; i++) > > printk(":%02x",addr[i]); > > > > to

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-23 Thread Johannes Berg
On Thu, 2007-08-23 at 09:01 -0700, Joe Perches wrote: > There are also several different uses of the equivalent of > > printk("%02x",addr[0]) > for (i=1; i<6; i++) > printk(":%02x",addr[i]); > > to print an ethernet MAC address. Hm. I didn't know that, I can go through

Re: [PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-23 Thread Joe Perches
On Wed, 2007-08-22 at 20:46 +0200, Johannes Berg wrote: > The two different wireless code bases both define macros to ease > printing MAC addresses: There are also several different uses of the equivalent of printk("%02x",addr[0]) for (i=1; i<6; i++) printk(":%02x"

[PATCH net-2.6.24] introduce MAC_FMT/MAC_ARG

2007-08-23 Thread Johannes Berg
The two different wireless code bases both define macros to ease printing MAC addresses: printk(KERN_INFO "MAC address is " MAC_FMT "\n", MAC_ARG(addr)); This patch moves those macros to if_ether.h and uses them all over the tree. Signed-off-by: Johannes Berg <[EMAIL PROTECTED]> --- drivers/ne