bcm63xx: zero initialize mac_addr_used.
PATCH 6/10 bcm63xx: zero initialize mac_addr_used.
This patch initializes mac_addr_used to zero, the checks against it later would not work properly.
Signed-off-by Maxime Bizon <[email protected]>
Signed-off-by Florian Fainelli <[email protected]>
---
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
@@ -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;/*
Quoted 11 lines · Florian Fainelli
This patch initializes
mac_addr_usedto zero, the checks against it later would not work properly.Signed-off-by Maxime Bizon <[email protected]>Signed-off-by Florian Fainelli <[email protected]>---
arch/mips/bcm63xx/boards/board_bcm963xx.c +0
-0
arch/mips/bcm63xx/boards/board_bcm963xx.c line 35
Quoted 5 lines
arch/mips/bcm63xx/boards/board_bcm963xx.c +1
-1@@ -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