[dpdk-dev] net/fm10k/base: add a break statement

Message ID 1482289505-47591-1-git-send-email-yao.chenghu@zte.com.cn (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Chenghu Yao Dec. 21, 2016, 3:05 a.m. UTC
  In function fm10k_mbx_create_reply(), the last case branch
has no break statement.

Signed-off-by: Chenghu Yao <yao.chenghu@zte.com.cn>
---
 drivers/net/fm10k/base/fm10k_mbx.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Chen, Jing D Dec. 22, 2016, 5:22 a.m. UTC | #1
Hi, Chenghu,


> -----Original Message-----
> From: Chenghu Yao [mailto:yao.chenghu@zte.com.cn]
> Sent: Wednesday, December 21, 2016 11:05 AM
> To: Chen, Jing D <jing.d.chen@intel.com>
> Cc: dev@dpdk.org; Chenghu Yao <yao.chenghu@zte.com.cn>
> Subject: [PATCH] net/fm10k/base: add a break statement
> 
> In function fm10k_mbx_create_reply(), the last case branch
> has no break statement.
> 
> Signed-off-by: Chenghu Yao <yao.chenghu@zte.com.cn>
> ---
>  drivers/net/fm10k/base/fm10k_mbx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/fm10k/base/fm10k_mbx.c
> b/drivers/net/fm10k/base/fm10k_mbx.c
> index 2e70434..45d6ddb 100644
> --- a/drivers/net/fm10k/base/fm10k_mbx.c
> +++ b/drivers/net/fm10k/base/fm10k_mbx.c
> @@ -1084,6 +1084,7 @@ STATIC s32 fm10k_mbx_create_reply(struct fm10k_hw
> *hw,
>  	case FM10K_STATE_CLOSED:
>  		/* generate new header based on data */
>  		fm10k_mbx_create_disconnect_hdr(mbx);
> +		break;
>  	default:
>  		break;
>  	}

Thanks for contributing code. But there are 2 problems here.

1. You are modifying base code under 'base' directory. It assumed READ ONLY because
    there is another Intel team are maintaining it.
2. Without your change, the code won't have any negative effect. Yes, I appreciate your
    change to make it stronger.

So, I'd to say 'NAC' for this patch.
  
Chenghu Yao Dec. 22, 2016, 6:01 a.m. UTC | #2
> 
> Thanks for contributing code. But there are 2 problems here.
> 
> 1. You are modifying base code under 'base' directory. It assumed 
> READ ONLY because
>     there is another Intel team are maintaining it.
> 2. Without your change, the code won't have any negative effect. 
> Yes, I appreciate your
>     change to make it stronger.
> 
> So, I'd to say 'NAC' for this patch.
> 

Ok, thanks for your reply.
  

Patch

diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c
index 2e70434..45d6ddb 100644
--- a/drivers/net/fm10k/base/fm10k_mbx.c
+++ b/drivers/net/fm10k/base/fm10k_mbx.c
@@ -1084,6 +1084,7 @@  STATIC s32 fm10k_mbx_create_reply(struct fm10k_hw *hw,
 	case FM10K_STATE_CLOSED:
 		/* generate new header based on data */
 		fm10k_mbx_create_disconnect_hdr(mbx);
+		break;
 	default:
 		break;
 	}