From 4de83653146bde33a4148c4a592948f8c862f4cb Mon Sep 17 00:00:00 2001 From: Wang Xiao W Date: Thu, 10 Sep 2015 12:38:23 +0800 Subject: [PATCH] fm10k/base: remove useless variable 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 --- 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 e6cf1c85a8..d65af212d0 100644 --- a/drivers/net/fm10k/base/fm10k_mbx.c +++ b/drivers/net/fm10k/base/fm10k_mbx.c @@ -1277,16 +1277,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: -- 2.20.1