iwlwifi: pcie: move iwl_pcie_ctxt_info_alloc_dma() to user
authorJohannes Berg <johannes.berg@intel.com>
Sat, 18 Apr 2020 08:08:46 +0000 (11:08 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 24 Apr 2020 13:38:10 +0000 (16:38 +0300)
There's no need for this to be an inline in the header file,
only the context-info.c file ever uses it. Move it there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200418110539.818a06457888.Ib4f55280cd14d7edab37f2992b381c9b6ca4cd7a@changeid
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c
drivers/net/wireless/intel/iwlwifi/pcie/internal.h

index acd01d8..b654050 100644 (file)
@@ -93,6 +93,21 @@ static void *iwl_pcie_ctxt_info_dma_alloc_coherent(struct iwl_trans *trans,
        return _iwl_pcie_ctxt_info_dma_alloc_coherent(trans, size, phys, 0);
 }
 
+static int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans,
+                                       const struct fw_desc *sec,
+                                       struct iwl_dram_data *dram)
+{
+       dram->block = iwl_pcie_ctxt_info_dma_alloc_coherent(trans, sec->len,
+                                                           &dram->physical);
+       if (!dram->block)
+               return -ENOMEM;
+
+       dram->size = sec->len;
+       memcpy(dram->block, sec->data, sec->len);
+
+       return 0;
+}
+
 void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans)
 {
        struct iwl_self_init_dram *dram = &trans->init_dram;
index 595e687..abe649a 100644 (file)
@@ -792,22 +792,6 @@ static inline int iwl_pcie_get_num_sections(const struct fw_img *fw,
        return i;
 }
 
-static inline int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans,
-                                              const struct fw_desc *sec,
-                                              struct iwl_dram_data *dram)
-{
-       dram->block = dma_alloc_coherent(trans->dev, sec->len,
-                                        &dram->physical,
-                                        GFP_KERNEL);
-       if (!dram->block)
-               return -ENOMEM;
-
-       dram->size = sec->len;
-       memcpy(dram->block, sec->data, sec->len);
-
-       return 0;
-}
-
 static inline void iwl_pcie_ctxt_info_free_fw_img(struct iwl_trans *trans)
 {
        struct iwl_self_init_dram *dram = &trans->init_dram;