Commit e8698301 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Luca Coelho

iwlwifi: fix false-positive maybe-uninitialized warning

With CONFIG_NO_AUTO_INLINE, we run into a silly warning when
gcc fails to remember that n_profiles is constant across
the function call to iwl_mvm_sar_set_profile:

drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function 'iwl_mvm_sar_get_ewrd_table':
drivers/net/wireless/intel/iwlwifi/mvm/fw.c:746:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Marking that function 'inline' avoids the warning.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 1e78e759
...@@ -646,7 +646,7 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm) ...@@ -646,7 +646,7 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
} }
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm, static inline int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm,
union acpi_object *table, union acpi_object *table,
struct iwl_mvm_sar_profile *profile, struct iwl_mvm_sar_profile *profile,
bool enabled) bool enabled)
......
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