summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-05-29 10:15:32 +0200
committerJoerg Roedel <jroedel@suse.de>2019-06-03 12:14:51 +0200
commit1b961423158caaae49d3900b7c9c37477bbfa9b3 (patch)
tree392b354bd19bac0db1372c737a1c920dbe33966b /drivers/iommu/amd_iommu.c
parentarm64: trim includes in dma-mapping.c (diff)
downloadlinux-1b961423158caaae49d3900b7c9c37477bbfa9b3.tar.xz
linux-1b961423158caaae49d3900b7c9c37477bbfa9b3.zip
iommu/dma: Fix condition check in iommu_dma_unmap_sg
Clang warns: drivers/iommu/dma-iommu.c:897:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ~~ drivers/iommu/dma-iommu.c:897:6: note: add parentheses after the '!' to evaluate the comparison first if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ( ) drivers/iommu/dma-iommu.c:897:6: note: add parentheses around left hand side expression to silence this warning if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ( ) 1 warning generated. Judging from the rest of the commit and the conditional in iommu_dma_map_sg, either if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) or if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) was intended, not a combination of the two. I personally think that the former is easier to understand so use that. Fixes: 06d60728ff5c ("iommu/dma: move the arm64 wrappers to common code") Link: https://github.com/ClangBuiltLinux/linux/issues/497 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
0 files changed, 0 insertions, 0 deletions