diff mbox series

[-next] i40e: remove variables set but not used

Message ID 20211213031107.52438-1-yang.lee@linux.alibaba.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [-next] i40e: remove variables set but not used | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: anjali.singhai@intel.com; 1 maintainers not CCed: anjali.singhai@intel.com
netdev/build_clang success Errors and warnings before: 3 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Li Dec. 13, 2021, 3:11 a.m. UTC
The code that uses variables pe_cntx_size and pe_filt_size 
has been removed, so they should be removed as well.

Eliminate the following clang warnings:
drivers/net/ethernet/intel/i40e/i40e_common.c:4139:20:
warning: variable 'pe_filt_size' set but not used.
drivers/net/ethernet/intel/i40e/i40e_common.c:4139:6:
warning: variable 'pe_cntx_size' set but not used.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 467d729abb72 ("i40e/i40evf: Fix code to accommodate i40e_register.h changes")
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

G, GurucharanX Dec. 22, 2021, 11 a.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Yang
> Li
> Sent: Monday, December 13, 2021 8:41 AM
> To: davem@davemloft.net
> Cc: Yang Li <yang.lee@linux.alibaba.com>; netdev@vger.kernel.org;
> llvm@lists.linux.dev; ndesaulniers@google.com; linux-kernel@vger.kernel.org;
> nathan@kernel.org; Abaci Robot <abaci@linux.alibaba.com>;
> kuba@kernel.org; intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH -next] i40e: remove variables set but not used
> 
> The code that uses variables pe_cntx_size and pe_filt_size has been removed,
> so they should be removed as well.
> 
> Eliminate the following clang warnings:
> drivers/net/ethernet/intel/i40e/i40e_common.c:4139:20:
> warning: variable 'pe_filt_size' set but not used.
> drivers/net/ethernet/intel/i40e/i40e_common.c:4139:6:
> warning: variable 'pe_cntx_size' set but not used.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 467d729abb72 ("i40e/i40evf: Fix code to accommodate i40e_register.h
> changes")
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c | 5 -----
>  1 file changed, 5 deletions(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index b4d3fed0d2f2..a775e55ae8bc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -4136,7 +4136,6 @@  static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
 				struct i40e_filter_control_settings *settings)
 {
 	u32 fcoe_cntx_size, fcoe_filt_size;
-	u32 pe_cntx_size, pe_filt_size;
 	u32 fcoe_fmax;
 	u32 val;
 
@@ -4180,8 +4179,6 @@  static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
 	case I40E_HASH_FILTER_SIZE_256K:
 	case I40E_HASH_FILTER_SIZE_512K:
 	case I40E_HASH_FILTER_SIZE_1M:
-		pe_filt_size = I40E_HASH_FILTER_BASE_SIZE;
-		pe_filt_size <<= (u32)settings->pe_filt_num;
 		break;
 	default:
 		return I40E_ERR_PARAM;
@@ -4198,8 +4195,6 @@  static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
 	case I40E_DMA_CNTX_SIZE_64K:
 	case I40E_DMA_CNTX_SIZE_128K:
 	case I40E_DMA_CNTX_SIZE_256K:
-		pe_cntx_size = I40E_DMA_CNTX_BASE_SIZE;
-		pe_cntx_size <<= (u32)settings->pe_cntx_num;
 		break;
 	default:
 		return I40E_ERR_PARAM;