Skip to content

Commit

Permalink
iwlwifi: stop passing bogus gfp flags arguments to dma_alloc_coherent
Browse files Browse the repository at this point in the history
dma_alloc_coherent is not just the page allocator.  The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
  • Loading branch information
Christoph Hellwig authored and Luca Coelho committed Sep 6, 2019
1 parent 5b79c32 commit 2d46f7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/intel/iwlwifi/fw/dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,8 +2485,7 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt, u32 size)

virtual_addr =
dma_alloc_coherent(fwrt->trans->dev, size, &phys_addr,
GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO |
__GFP_COMP);
GFP_KERNEL | __GFP_NOWARN);

/* TODO: alloc fragments if needed */
if (!virtual_addr)
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/wireless/intel/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans,
for (power = max_power; power >= min_power; power--) {
size = BIT(power);
cpu_addr = dma_alloc_coherent(trans->dev, size, &phys,
GFP_KERNEL | __GFP_NOWARN |
__GFP_ZERO | __GFP_COMP);
GFP_KERNEL | __GFP_NOWARN);
if (!cpu_addr)
continue;

Expand Down

0 comments on commit 2d46f7a

Please sign in to comment.