linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF
@ 2009-12-06 20:32 Joe Perches
  2009-12-06 20:35 ` [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF Joe Perches
  2009-12-09  4:42 ` [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Perches @ 2009-12-06 20:32 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML

And use a directly declared buffer.

It's used in a call to prom_get_ethernet_addr to
get a 6 byte address, not a formatted output string.

Signed-off-by: Joe Perches <joe@perches.com>

diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 1acf2c1..af271fa 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -1006,7 +1006,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 	db_dest_t *pDB, *pDBfree;
 	int irq, i, err = 0;
 	struct resource *base, *macen;
-	DECLARE_MAC_BUF(ethaddr);
+	char ethaddr[ETH_ALEN];
 
 	base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!base) {



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF
  2009-12-06 20:32 [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF Joe Perches
@ 2009-12-06 20:35 ` Joe Perches
  2009-12-09  4:42   ` David Miller
  2009-12-09  4:42 ` [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2009-12-06 20:35 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML

Signed-off-by: Joe Perches <joe@perches.com>

diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 005e152..299b412 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -137,8 +137,6 @@ extern struct ctl_table ether_table[];
 extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
 
 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_BUF_SIZE	18
-#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE]
 
 #endif
 



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF
  2009-12-06 20:32 [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF Joe Perches
  2009-12-06 20:35 ` [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF Joe Perches
@ 2009-12-09  4:42 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-12-09  4:42 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Sun, 06 Dec 2009 12:32:43 -0800

> And use a directly declared buffer.
> 
> It's used in a call to prom_get_ethernet_addr to
> get a 6 byte address, not a formatted output string.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

This DECLARE_MAC_BUF reference is already moved in the tree.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF
  2009-12-06 20:35 ` [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF Joe Perches
@ 2009-12-09  4:42   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-12-09  4:42 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel

From: Joe Perches <joe@perches.com>
Date: Sun, 06 Dec 2009 12:35:30 -0800

> Signed-off-by: Joe Perches <joe@perches.com>

Applied, thanks Joe.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-09  4:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-06 20:32 [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF Joe Perches
2009-12-06 20:35 ` [PATCH 2/2] include/linux/if_ether.h: Remove unused defines MAC_BUF_SIZE and DECLARE_MAC_BUF Joe Perches
2009-12-09  4:42   ` David Miller
2009-12-09  4:42 ` [PATCH 1/2] drivers/net/au1000_eth.c: Remove misuse of DECLARE_MAC_BUF David Miller

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).