iwlwifi: pcie: trans: Remove unused 'shift_param'
PATCH v2 3/3 iwlwifi: pcie: trans: Remove unused 'shift_param'
shift_param is defined and set in iwl_pcie_load_cpu_sections but not used. Fix this to avoid -Wunused-but-set-variable warning.
The code using it turned into dead code with commit dcab8ecd5617 which added a separate function iwl_pcie_load_given_ucode_8000 (then 8000b) for IWL_DEVICE_FAMILY_8000. Commit 76f8c0e17edc removed the dead code but left shift_param as is.
iwlwifi/pcie/trans.c: In function ‘iwl_pcie_load_cpu_sections’:iwlwifi/pcie/trans.c:871:6: warning: variable ‘shift_param’ set but not used [-Wunused-but-set-variable]
--- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +0 -3
@@ -868,15 +868,12 @@ static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans,int cpu, int *first_ucode_section) { - int shift_param; int i, ret = 0;u32 last_read_idx =0 ;if (cpu ==1 ) { - shift_param =0 ; *first_ucode_section =0 ; }else { - shift_param =16 ; (*first_ucode_section)++; }
Signature · 1 line
2.8.0.rc3.226.g39d4020
Quoted 11 lines · Kirtika Ruchandani
shift_paramis defined and set iniwl_pcie_load_cpu_sectionsbut not used. Fix this to avoid -Wunused-but-set-variable warning.
The code using it turned into dead code with commitdcab8ecd5617which added a separate functioniwl_pcie_load_given_ucode_8000(then 8000b) forIWL_DEVICE_FAMILY_8000. Commit76f8c0e17edcremoved the dead code but leftshift_paramas is.
iwlwifi/pcie/trans.c: In function ‘iwl_pcie_load_cpu_sections’:iwlwifi/pcie/trans.c:871:6: warning: variable ‘shift_param’ set but not used [-Wunused-but-set-variable]
Quoted 7 lines
Fixes dcab8ecd5617 (iwlwifi: mvm: support ucode load for family_8000 B0 only)Fixes 76f8c0e17edc (iwlwifi: pcie: remove dead code)Signed-off-by Kirtika Ruchandani <[email protected]>Cc Sara Sharon <[email protected]>Cc Luca Coelho <[email protected]>Cc Eran Harary <[email protected]>
I'll remove Harary's Cc here too, since this email is not valid anymore and I don't know his new one (and he probably doesn't care anymore anyway).
--
Luca.