// SPDX-License-Identifier: GPL-2.0
 /* Copyright(c) 2013 - 2018 Intel Corporation. */
 
+#include "i40e.h"
 #include "i40e_osdep.h"
 #include "i40e_register.h"
 #include "i40e_type.h"
 
 /**
  * i40e_hmc_get_object_va - retrieves an object's virtual address
- * @hmc_info: pointer to i40e_hmc_info struct
+ * @hw: the hardware struct, from which we obtain the i40e_hmc_info pointer
  * @object_base: pointer to u64 to get the va
  * @rsrc_type: the hmc resource type
  * @obj_idx: hmc object index
  * base pointer.  This function is used for LAN Queue contexts.
  **/
 static
-i40e_status i40e_hmc_get_object_va(struct i40e_hmc_info *hmc_info,
-                                       u8 **object_base,
-                                       enum i40e_hmc_lan_rsrc_type rsrc_type,
-                                       u32 obj_idx)
+i40e_status i40e_hmc_get_object_va(struct i40e_hw *hw, u8 **object_base,
+                                  enum i40e_hmc_lan_rsrc_type rsrc_type,
+                                  u32 obj_idx)
 {
+       struct i40e_hmc_info *hmc_info = &hw->hmc;
        u32 obj_offset_in_sd, obj_offset_in_pd;
-       i40e_status ret_code = 0;
        struct i40e_hmc_sd_entry *sd_entry;
        struct i40e_hmc_pd_entry *pd_entry;
        u32 pd_idx, pd_lmt, rel_pd_idx;
+       i40e_status ret_code = 0;
        u64 obj_offset_in_fpm;
        u32 sd_idx, sd_lmt;
 
        i40e_status err;
        u8 *context_bytes;
 
-       err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
+       err = i40e_hmc_get_object_va(hw, &context_bytes,
                                     I40E_HMC_LAN_TX, queue);
        if (err < 0)
                return err;
        i40e_status err;
        u8 *context_bytes;
 
-       err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
+       err = i40e_hmc_get_object_va(hw, &context_bytes,
                                     I40E_HMC_LAN_TX, queue);
        if (err < 0)
                return err;
        i40e_status err;
        u8 *context_bytes;
 
-       err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
+       err = i40e_hmc_get_object_va(hw, &context_bytes,
                                     I40E_HMC_LAN_RX, queue);
        if (err < 0)
                return err;
        i40e_status err;
        u8 *context_bytes;
 
-       err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
+       err = i40e_hmc_get_object_va(hw, &context_bytes,
                                     I40E_HMC_LAN_RX, queue);
        if (err < 0)
                return err;