aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMukesh Sisodiya <[email protected]>2023-05-31 16:50:04 +0000
committerJohannes Berg <[email protected]>2023-06-06 11:40:21 +0000
commit4784f3f9232fd295245d54abdf03002a91e4784f (patch)
treecda85b0b91ba1167dcbb13c2fc37ba643c6634a9
parentwifi: iwlwifi: Add Dell to ppag approved list (diff)
downloadkernel-4784f3f9232fd295245d54abdf03002a91e4784f.tar.gz
kernel-4784f3f9232fd295245d54abdf03002a91e4784f.zip
wifi: iwlwifi: remove dead code in iwl_dump_ini_imr_get_size()
Remove the check for the IMR debug data size which leads to dead code. Signed-off-by: Mukesh Sisodiya <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230531194630.58eec8d40729.Ifb7d64706eed45726db804f36e785283dff7adab@changeid Signed-off-by: Johannes Berg <[email protected]>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index d9faaae01abd..3180cabc0212 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2031,7 +2031,6 @@ static u32
iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt,
struct iwl_dump_ini_region_data *reg_data)
{
- u32 size = 0;
u32 ranges = 0;
u32 imr_enable = fwrt->trans->dbg.imr_data.imr_enable;
u32 imr_size = fwrt->trans->dbg.imr_data.imr_size;
@@ -2041,17 +2040,16 @@ iwl_dump_ini_imr_get_size(struct iwl_fw_runtime *fwrt,
IWL_DEBUG_INFO(fwrt,
"WRT: Invalid imr data enable: %d, imr_size: %d, sram_size: %d\n",
imr_enable, imr_size, sram_size);
- return size;
+ return 0;
}
- size = imr_size;
ranges = iwl_dump_ini_imr_ranges(fwrt, reg_data);
- if (!size && !ranges) {
- IWL_ERR(fwrt, "WRT: imr_size :=%d, ranges :=%d\n", size, ranges);
+ if (!ranges) {
+ IWL_ERR(fwrt, "WRT: ranges :=%d\n", ranges);
return 0;
}
- size += sizeof(struct iwl_fw_ini_error_dump) +
+ imr_size += sizeof(struct iwl_fw_ini_error_dump) +
ranges * sizeof(struct iwl_fw_ini_error_dump_range);
- return size;
+ return imr_size;
}
/**