Commit 3ce4a038 authored by Kirtika Ruchandani's avatar Kirtika Ruchandani Committed by Luca Coelho

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 dcab8ecd
("iwlwifi: mvm: support ucode load for family_8000 B0 only") which
added a separate function iwl_pcie_load_given_ucode_8000 (then 8000b)
for IWL_DEVICE_FAMILY_8000. Commit 76f8c0e1 ("iwlwifi: pcie:
remove dead code") 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]

Fixes: dcab8ecd ("iwlwifi: mvm: support ucode load for family_8000 B0 only")
Fixes: 76f8c0e1 ("iwlwifi: pcie: remove dead code")
Signed-off-by: default avatarKirtika Ruchandani <kirtika@google.com>
Cc: Sara Sharon <sara.sharon@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Cc: Liad Kaufman <liad.kaufman@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[removed some unnecessary braces]
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 9d504435
...@@ -868,17 +868,13 @@ static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans, ...@@ -868,17 +868,13 @@ static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans,
int cpu, int cpu,
int *first_ucode_section) int *first_ucode_section)
{ {
int shift_param;
int i, ret = 0; int i, ret = 0;
u32 last_read_idx = 0; u32 last_read_idx = 0;
if (cpu == 1) { if (cpu == 1)
shift_param = 0;
*first_ucode_section = 0; *first_ucode_section = 0;
} else { else
shift_param = 16;
(*first_ucode_section)++; (*first_ucode_section)++;
}
for (i = *first_ucode_section; i < image->num_sec; i++) { for (i = *first_ucode_section; i < image->num_sec; i++) {
last_read_idx = i; last_read_idx = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment