[PATCH] sparc(64)/iommu: fixup iommu_tbl_range_alloc() types

David Miller davem at davemloft.net
Wed Nov 4 08:38:26 PST 2015


From: Andre Przywara <andre.przywara at arm.com>
Date: Mon, 5 Oct 2015 10:54:05 +0100

> On 21/09/15 18:17, Andre Przywara wrote:
>> With DMA_ERROR_CODE now being dma_addr_t in most architectures, it
>> turned out that iommu_tbl_range_alloc (defined in lib/iommu-common.c)
>> is actually using a wrong return type.
>> This was easily fixed in a previous patch, but now the types in the
>> callers do not match anymore.
>> This patch fixes the obvious mismatches to allow sane comparisons with
>> the error return value.
>> Compile-tested on sparc, sparc64, x86, ARM, arm64.
> 
> Is there any news on that issue? Are you willing to take either of my
> patches to fix the compile warnings I see on ARM with LPAE enabled?

Sorry for the late response, I was travelling/conferencing and didn't
have a lot of time for issues like this.

I'm going to fix iommu_tbl_range_alloc()'s return value semantics.

The thing it is returning is a page table index, not a dma_addr_t
address.  So it is appropriate to create a special error indication
value for this, independant of DMA_ERROR_CODE.

I got this wrong during my initial review of these changes.



More information about the linux-arm-kernel mailing list