[PATCH] Staging: bcm: CmHost: added breaks and /* FALLTHROUGH */ to switch/case.

Greg KH gregkh at linuxfoundation.org
Mon Mar 17 19:25:09 UTC 2014


On Sun, Mar 16, 2014 at 03:31:18PM -0400, Gary Rookard wrote:
> I added a couple of breaks, and a /* FALLTHROUGH */ comment to switch/case
> assuming that is the actual desired effect needed by the case label.
> 
> Signed-off-by: Gary Alan Rookard <garyrookard at gmail.com>
> 
> ---
> On branch staging-next
>  drivers/staging/bcm/CmHost.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
> index 4cb59d7..9252ef1 100644
> --- a/drivers/staging/bcm/CmHost.c
> +++ b/drivers/staging/bcm/CmHost.c
> @@ -1678,8 +1678,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter,  /* <Pointer to
>  		*((struct bcm_add_indication_alt *)&(Adapter->caDsxReqResp[LEADER_SIZE]))
>  			= *pstAddIndication;
>  		((struct bcm_add_indication_alt *)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
> -
> -	} /* no break here..we should go down. */
> +	}	/* FALLTHROUGH */
>  	case DSA_ACK:
>  	{
>  
> @@ -1787,6 +1786,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter,  /* <Pointer to
>  		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
>  		*((struct bcm_change_indication *)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
>  		((struct bcm_change_indication *)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
> +		break;
>  	}
>  	case DSC_ACK:
>  	{
> @@ -1865,6 +1865,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter,  /* <Pointer to
>  		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "SENDING DSD RESPONSE TO MAC");
>  		((struct bcm_del_indication *)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
>  		CopyBufferToControlPacket(Adapter, (PVOID)Adapter->caDsxReqResp);
> +		break;

Are you _sure_ these two changes are ok?  Do you have a device to test?
If not, I can't really take this patch as it does change the logic
involved here :(

thanks,

greg k-h


More information about the devel mailing list