Skip to content

Commit 792d47c

Browse files
joergroedelgregkh
authored andcommitted
iommu/dma: Fix compile warning in 32-bit builds
commit 7154cbd upstream. Compiling the recent dma-iommu changes under 32-bit x86 triggers this compile warning: drivers/iommu/dma-iommu.c:249:5: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] The reason is that %llx is used to print a variable of type phys_addr_t. Fix it by using the correct %pa format specifier for phys_addr_t. Cc: Srinath Mannam <srinath.mannam@broadcom.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Oza Pawandeep <poza@codeaurora.org> Fixes: 571f316 ("iommu/dma: Fix IOVA reserve dma ranges") Signed-off-by: Joerg Roedel <jroedel@suse.de> Link: https://lore.kernel.org/r/20210607124905.27525-1-joro@8bytes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a7f4f0c commit 792d47c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/iommu/dma-iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ static int iova_reserve_pci_windows(struct pci_dev *dev,
219219
} else if (end < start) {
220220
/* dma_ranges list should be sorted */
221221
dev_err(&dev->dev,
222-
"Failed to reserve IOVA [%#010llx-%#010llx]\n",
223-
start, end);
222+
"Failed to reserve IOVA [%pa-%pa]\n",
223+
&start, &end);
224224
return -EINVAL;
225225
}
226226

0 commit comments

Comments
 (0)