On Mon, Mar 17, 2014 at 06:01:24PM -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. > > Signed-off-by: Gary Rookard <garyrookard@xxxxxxxxx> > > --- > On branch staging-next > drivers/staging/bcm/CmHost.c | 27 +++------------------------ > 1 file changed, 3 insertions(+), 24 deletions(-) > > diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c > index cc82588..b3002d7 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; > /* You forgot to add a line after the variable and before the comment here :( > * Otherwise the message contains a target address from where we need to > * read out the rest of the service flow param structure > @@ -1658,7 +1659,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to > BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n", pstAddIndication->u16TID); > switch (pstAddIndication->u8Type) { > case DSA_REQ: > - { > pLeader->PLength = sizeof(struct bcm_add_indication_alt); > BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Sending DSA Response....\n"); > BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength); > @@ -1669,10 +1669,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to > BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, " VCID = %x", ntohs(pstAddIndication->u16VCID)); > CopyBufferToControlPacket(Adapter, (PVOID)Adapter->caDsxReqResp); > kfree(pstAddIndication); > - } > break; Can you properly indent the break; lines as well? thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel