The reference to err_no was left around after an old re-factor. We never use this value again, and the macros called on the function appear to have no relevant side effect I could see. Discovered via cppcheck fm10k_mbx.c:1312: (style) Variable 'err_no' is assigned a value that is never used.
This occurred because a previous commit refactored and removed all used references to err_no. Signed-off-by: Wang Xiao W <xiao.w.wang at intel.com> --- drivers/net/fm10k/base/fm10k_mbx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/fm10k/base/fm10k_mbx.c b/drivers/net/fm10k/base/fm10k_mbx.c index 0cdd24d..ad9d81a 100644 --- a/drivers/net/fm10k/base/fm10k_mbx.c +++ b/drivers/net/fm10k/base/fm10k_mbx.c @@ -1292,16 +1292,11 @@ STATIC s32 fm10k_mbx_process_error(struct fm10k_hw *hw, struct fm10k_mbx_info *mbx) { const u32 *hdr = &mbx->mbx_hdr; - s32 err_no; u16 head; /* we will need to pull all of the fields for verification */ head = FM10K_MSG_HDR_FIELD_GET(*hdr, HEAD); - /* we only have lower 10 bits of error number so add upper bits */ - err_no = FM10K_MSG_HDR_FIELD_GET(*hdr, ERR_NO); - err_no |= ~FM10K_MSG_HDR_MASK(ERR_NO); - switch (mbx->state) { case FM10K_STATE_OPEN: case FM10K_STATE_DISCONNECT: -- 1.9.3