[PATCH 2/2] drivers/staging/nvec/nvec_power.c: Fix checkpatch warnings

Dan Carpenter dan.carpenter at oracle.com
Thu Sep 22 10:31:09 UTC 2011


On Thu, Sep 22, 2011 at 06:34:00AM -0300, Marcos Paulo de Souza wrote:
> Fixed some warnings like, spaces at start of line, ident of switch/case statements, and a
> static variable initialized by 0.
> 
> Signed-off-by: Marcos Paulo de Souza <marcos.mage at gmail.com>
> ---


> @@ -327,9 +317,8 @@ static struct power_supply nvec_psy = {
>  	.get_property = nvec_power_get_property,
>  };
>  
> -static int counter = 0;
> +static int counter = 1;

No...  You can't randomly change things like that.  Why would you
think that 1 is a better value than 0?  The point of the checkpatch
warning is that you counter is 0 by default so you don't need to set
it.

static int counter;

regards,
dan carpenter



More information about the devel mailing list