[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190722152637.GA3780@lst.de>
Date: Mon, 22 Jul 2019 17:26:38 +0200
From: Christoph Hellwig <hch@....de>
To: Eric Auger <eric.auger@...hat.com>
Cc: eric.auger.pro@...il.com, hch@....de, m.szyprowski@...sung.com,
robin.murphy@....com, mst@...hat.com, jasowang@...hat.com,
virtualization@...ts.linux-foundation.org,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dma-mapping: Protect dma_addressing_limited
against NULL dma_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 WARN_ON_ONCE(!dev->dma_mask) ? false :
> + min_not_zero(*dev->dma_mask, dev->bus_dma_mask) <
> + dma_get_required_mask(dev);
This should really use a separate if statement, but I can fix that
up when applying it.
Powered by blists - more mailing lists