Paul Burton d411da06ab
MIPS: dma-noncoherent: Remove bogus condition in dma_sync_phys()
Commit e36863a550da ("MIPS: HIGHMEM DMA on noncoherent MIPS32
processors") introduced code which:

  1) Calculates an offset within a page, by ANDing an address
     with ~PAGE_MASK.

  2) Checks whether that offset is >= PAGE_SIZE.

This check can never evaluate true, making the code it guards
unreachable. smatch spots bogus arithmetic resulting from the
impossible condition, resulting in the following warning:

  arch/mips/mm/dma-noncoherent.c:125
    dma_sync_phys() warn: mask and shift to zero

Fix this by removing the impossible to satisfy condition & the
unreachable code it guards.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
2019-02-19 12:17:43 -08:00
..
2013-02-01 10:00:22 +01:00
2013-02-01 10:00:22 +01:00
2019-02-04 10:56:41 -08:00
2018-07-05 14:43:21 -07:00
2017-02-02 15:06:26 +00:00
2019-02-04 10:56:41 -08:00
2018-12-03 13:42:38 -08:00