]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iwlwifi: fix false-positive maybe-uninitialized warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 10 Dec 2018 20:39:06 +0000 (21:39 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 20 Feb 2019 18:47:54 +0000 (20:47 +0200)
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>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 1bc51e3260ebcea3fa2f40bf0e40efd5c69b44fc..00a47f6f1d81503a8e8212566efe6ef6e728ccc8 100644 (file)
@@ -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;