* [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0
@ 2009-05-31 18:28 Florian Fainelli
2009-06-01 14:41 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-05-31 18:28 UTC (permalink / raw)
To: linux-mips, Ralf Baechle, Maxime Bizon
This patch initialize the shared_device_registered
variable with 0, actually required for the check
to be working.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
index 51c2e5a..0298973 100644
--- a/arch/mips/bcm63xx/dev-enet.c
+++ b/arch/mips/bcm63xx/dev-enet.c
@@ -28,7 +28,7 @@ static struct platform_device bcm63xx_enet_shared_device = {
.resource = shared_res,
};
-static int shared_device_registered;
+static int shared_device_registered = 0;
static struct resource enet0_res[] = {
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0
2009-05-31 18:28 [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0 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:28:37PM +0200, Florian Fainelli wrote:
> This patch initialize the shared_device_registered
> variable with 0, actually required for the check
> to be working.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/arch/mips/bcm63xx/dev-enet.c b/arch/mips/bcm63xx/dev-enet.c
> index 51c2e5a..0298973 100644
> --- a/arch/mips/bcm63xx/dev-enet.c
> +++ b/arch/mips/bcm63xx/dev-enet.c
> @@ -28,7 +28,7 @@ static struct platform_device bcm63xx_enet_shared_device = {
> .resource = shared_res,
> };
>
> -static int shared_device_registered;
> +static int shared_device_registered = 0;
This is bogus. 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:41 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:28 [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0 Florian Fainelli
2009-06-01 14:41 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.