diff options
author | Kirtika Ruchandani | 2016-11-09 06:50:48 +0100 |
---|---|---|
committer | Luca Coelho | 2017-01-26 08:39:00 +0100 |
commit | 3ce4a03852d6dd3fd28c2fb2ee9f89bb9ccf9a9b (patch) | |
tree | 7891506c84fcc8b3925dae69bd7bfde9857171d1 /drivers/net/wireless/intel/iwlwifi/pcie | |
parent | iwlwifi: mvm: rs: Remove unused 'mcs' variable (diff) | |
download | kernel-qcow2-linux-3ce4a03852d6dd3fd28c2fb2ee9f89bb9ccf9a9b.tar.gz kernel-qcow2-linux-3ce4a03852d6dd3fd28c2fb2ee9f89bb9ccf9a9b.tar.xz kernel-qcow2-linux-3ce4a03852d6dd3fd28c2fb2ee9f89bb9ccf9a9b.zip |
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
("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 76f8c0e17edc ("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: dcab8ecd5617 ("iwlwifi: mvm: support ucode load for family_8000 B0 only")
Fixes: 76f8c0e17edc ("iwlwifi: pcie: remove dead code")
Signed-off-by: Kirtika 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: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index bf0ecdcf7402..16790db650c1 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -868,17 +868,13 @@ 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; + if (cpu == 1) *first_ucode_section = 0; - } else { - shift_param = 16; + else (*first_ucode_section)++; - } for (i = *first_ucode_section; i < image->num_sec; i++) { last_read_idx = i; |