linux-mips
[Top] [All Lists]

Re: [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered

To: Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 1 Jun 2009 15:41:13 +0100
Cc: linux-mips@linux-mips.org, Maxime Bizon <mbizon@freebox.fr>
In-reply-to: <200905312028.37498.florian@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200905312028.37498.florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 05/10] bcm63xx: dev-enet: initialize shared_device_registered to 0, Ralf Baechle <=