[PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

Greg KH gregkh at linuxfoundation.org
Tue Mar 18 20:02:10 UTC 2014


On Mon, Mar 17, 2014 at 08:21:34PM -0400, Gary Rookard wrote:
> Firstly, some background is needed to confirm the validity of
> this patch as error fixing. It seems the developer when writing
> this driver from scratch, used what are known to me as error
> suppressors in the form of extra tmp bracing added to the case labels.
> They aid during construction time, but are not intended to remain.
> 
> In this scenario there are declarations occupying space only
> reserved for statements. If these tmp braces were to be removed
> before the declarations in question were reassigned to there
> proper place in the funtion, compile time errors would result.
> 
> So, having that said, I moved the declarations,
> UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
> and also deleted the duplicates thereof from
> the switch/case statement.
> 
> Removed temporary bracing from case labels.
> 
> Removed new lines as needed.
> 
> Properly indented case breaks.
> 
> Signed-off-by: Gary Rookard <garyrookard at gmail.com>
> 
> ---
> On branch staging-next
>  drivers/staging/bcm/CmHost.c | 38 ++++++++------------------------------
>  1 file changed, 8 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
> index cc82588..8d46b38 100644
> --- a/drivers/staging/bcm/CmHost.c
> +++ b/drivers/staging/bcm/CmHost.c
> @@ -1635,7 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter,  /* <Pointer to
>  	struct bcm_add_indication_alt *pstAddIndication = NULL;
>  	struct bcm_change_indication *pstChangeIndication = NULL;
>  	struct bcm_leader *pLeader = NULL;
> -
> +	UINT uiSearchRuleIndex = 0;
> +	ULONG ulSFID;
>  	/*

For the 3rd (or is it 4th?) time, please put a new line after the
variable definition and before the comment.



More information about the devel mailing list