Skip to content

Commit

Permalink
Merge tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dm…
Browse files Browse the repository at this point in the history
…a-mapping

Pull dma-mapping regression fix from Christoph Hellwig:
 "Ensure that dma_addressing_limited doesn't crash on devices without a
  dma mask (Eric Auger)"

* tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: use dma_get_mask in dma_addressing_limited
  • Loading branch information
torvalds committed Jul 24, 2019
2 parents ad5e427 + 0653275 commit c262687
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
*/
static inline bool dma_addressing_limited(struct device *dev)
{
return min_not_zero(*dev->dma_mask, dev->bus_dma_mask) <
dma_get_required_mask(dev);
return min_not_zero(dma_get_mask(dev), dev->bus_dma_mask) <
dma_get_required_mask(dev);
}

#ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS
Expand Down

0 comments on commit c262687

Please sign in to comment.