diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-12-10 23:39:06 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-02-20 21:47:54 +0300 |
commit | e8698301f2c13ea4b0e78f2ed8a15b244ee3649b (patch) | |
tree | 6a1d81b5d0e4722fcf850d4e9f13b5c94f3eb576 /drivers/net/wireless/intel | |
parent | 1e78e759bed84cc55e08cc10988287464a49747f (diff) | |
download | linux-e8698301f2c13ea4b0e78f2ed8a15b244ee3649b.tar.xz |
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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 1bc51e3260eb..00a47f6f1d81 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -646,10 +646,10 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm) } #ifdef CONFIG_ACPI -static int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm, - union acpi_object *table, - struct iwl_mvm_sar_profile *profile, - bool enabled) +static inline int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm, + union acpi_object *table, + struct iwl_mvm_sar_profile *profile, + bool enabled) { int i; |