linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/10] bcm63xx: zero initialize mac_addr_used.
@ 2009-05-31 18:29 Florian Fainelli
  2009-06-01 14:41 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-05-31 18:29 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle, Maxime Bizon

This patch initializes mac_addr_used to zero, the checks
against it later would not work properly.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 78a40e7..298804a 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -32,7 +32,7 @@
 #define PFX	"board_bcm963xx: "
 
 static struct bcm963xx_nvram nvram;
-static unsigned int mac_addr_used;
+static unsigned int mac_addr_used = 0;
 static struct board_info board;
 
 /*

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

* Re: [PATCH 06/10] bcm63xx: zero initialize mac_addr_used.
  2009-05-31 18:29 [PATCH 06/10] bcm63xx: zero initialize mac_addr_used Florian Fainelli
@ 2009-06-01 14:41 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-06-01 14:41 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-mips, Maxime Bizon

On Sun, May 31, 2009 at 08:29:07PM +0200, Florian Fainelli wrote:

> This patch initializes mac_addr_used to zero, the checks
> against it later would not work properly.
> 
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
> index 78a40e7..298804a 100644
> --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
> +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
> @@ -32,7 +32,7 @@
>  #define PFX	"board_bcm963xx: "
>  
>  static struct bcm963xx_nvram nvram;
> -static unsigned int mac_addr_used;
> +static unsigned int mac_addr_used = 0;

Ditto - the variable defaults to zero.  Explicit initialization however
will inflate the .data section.  Dropped.

  Ralf

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

end of thread, other threads:[~2009-06-01 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-31 18:29 [PATCH 06/10] bcm63xx: zero initialize mac_addr_used Florian Fainelli
2009-06-01 14:41 ` Ralf Baechle

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