]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu-common: Fix error code used in iommu_tbl_range_{alloc,free}().
authorDavid S. Miller <davem@davemloft.net>
Wed, 4 Nov 2015 19:30:57 +0000 (11:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Nov 2015 19:30:57 +0000 (11:30 -0800)
commitd618382ba5f1a4905db63f4980bf7b0a5826de9d
tree5bc612d222a70276b0e4d9df476b2548c1286d9e
parent73958c651fbf70d8d8bf2a60b871af5f7a2e3199
iommu-common: Fix error code used in iommu_tbl_range_{alloc,free}().

The value returned from iommu_tbl_range_alloc() (and the one passed
in as a fourth argument to iommu_tbl_range_free) is not a DMA address,
it is rather an index into the IOMMU page table.

Therefore using DMA_ERROR_CODE is not appropriate.

Use a more type matching error code define, IOMMU_ERROR_CODE, and
update all users of this interface.

Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/iommu.c
arch/sparc/kernel/ldc.c
arch/sparc/kernel/pci_sun4v.c
include/linux/iommu-common.h
lib/iommu-common.c