iwlwifi: mvm: don't get address of mvm->fwrt just to dereference as a pointer
authorLuca Coelho <luciano.coelho@intel.com>
Sun, 24 Oct 2021 15:20:29 +0000 (18:20 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 28 Oct 2021 09:04:11 +0000 (12:04 +0300)
The mvm->fwrt element is not a pointer, but an instance of the
structure, so we should access its elements with a dot-notation
instead of getting the address and dereferencing it as a pointer.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211024181719.ce6841093681.I09634a0aa845a0256e79c7895154d9ac35bc26be@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 6063b2ffe2665459dac17a33e3de59ff4ca88743..8b96b885658f1da404319dfb72fbfc1cb37632ed 100644 (file)
@@ -1144,7 +1144,7 @@ static void iwl_mvm_tas_init(struct iwl_mvm *mvm)
 static u8 iwl_mvm_eval_dsm_rfi(struct iwl_mvm *mvm)
 {
        u8 value;
-       int ret = iwl_acpi_get_dsm_u8((&mvm->fwrt)->dev, 0, DSM_RFI_FUNC_ENABLE,
+       int ret = iwl_acpi_get_dsm_u8(mvm->fwrt.dev, 0, DSM_RFI_FUNC_ENABLE,
                                      &iwl_rfi_guid, &value);
 
        if (ret < 0) {
@@ -1173,18 +1173,18 @@ static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
 
        cmd.config_bitmap = iwl_acpi_get_lari_config_bitmap(&mvm->fwrt);
 
-       ret = iwl_acpi_get_dsm_u32((&mvm->fwrt)->dev, 0, DSM_FUNC_11AX_ENABLEMENT,
+       ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0, DSM_FUNC_11AX_ENABLEMENT,
                                   &iwl_guid, &value);
        if (!ret)
                cmd.oem_11ax_allow_bitmap = cpu_to_le32(value);
 
-       ret = iwl_acpi_get_dsm_u32((&mvm->fwrt)->dev, 0,
+       ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
                                   DSM_FUNC_ENABLE_UNII4_CHAN,
                                   &iwl_guid, &value);
        if (!ret)
                cmd.oem_unii4_allow_bitmap = cpu_to_le32(value);
 
-       ret = iwl_acpi_get_dsm_u32((&mvm->fwrt)->dev, 0,
+       ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
                                   DSM_FUNC_ACTIVATE_CHANNEL,
                                   &iwl_guid, &value);
        if (!ret)