Skip to contentSkip to conversation

iommu: Fix printk formats for dma_addr_t

PATCH Applied Varun Sethi 2 participants 2 messages Apr 11, 2013 – May 2, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: Fix printk formats for dma_addr_t

Fix printk formats for dma_addr_t:

drivers/iommu/tegra-smmu.c: In function 'smmu_iommu_iova_to_phys':

Quoted 1 line
Quoted 1 line

drivers/iommu/tegra-smmu.c:774:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]

--
drivers/iommu/tegra-gart.c: In function 'gart_iommu_iova_to_phys':

Quoted 1 line
Quoted 1 line

drivers/iommu/tegra-gart.c:298:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat]

---
 drivers/iommu/tegra-gart.c |    3 ++-
 drivers/iommu/tegra-smmu.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/iommu/tegra-gart.c +2 -1
index 4aec8be..108c0e9 100644
@@ -295,7 +295,8 @@ static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain,
 
 	pa = (pte & GART_PAGE_MASK);
 	if (!pfn_valid(__phys_to_pfn(pa))) {
-		dev_err(gart->dev, "No entry for %08lx:%08x\n", iova, pa);
+		dev_err(gart->dev, "No entry for %08llx:%08x\n",
+			 (unsigned long long)iova, pa);
 		gart_dump_table(gart);
 		return -EINVAL;
 	}
drivers/iommu/tegra-smmu.c +2 -1
index bc9b599..f6f120e 100644
@@ -772,7 +772,8 @@ static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain,
 	pfn = *pte & SMMU_PFN_MASK;
 	WARN_ON(!pfn_valid(pfn));
 	dev_dbg(as->smmu->dev,
-		"iova:%08lx pfn:%08lx asid:%d\n", iova, pfn, as->asid);
+		"iova:%08llx pfn:%08lx asid:%d\n", (unsigned long long)iova,
+		 pfn, as->asid);
 
 	spin_unlock_irqrestore(&as->lock, flags);
 	return PFN_PHYS(pfn);
Signature · 1 line
1.7.4.1

A message that is not in the archive (sent off-list or not yet received): 1365652184-4340-1-git-send-email-Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org

Applied
#2 lore raw
Quoted 9 lines · Varun Sethi

Fix printk formats for dma_addr_t:

drivers/iommu/tegra-smmu.c: In function 'smmu_iommu_iova_to_phys':

Quoted 1 line
Quoted 1 line

drivers/iommu/tegra-smmu.c:774:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]

--
drivers/iommu/tegra-gart.c: In function 'gart_iommu_iova_to_phys':

Quoted 1 line
Quoted 1 line

drivers/iommu/tegra-gart.c:298:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat]

Applied to arm/tegra, thanks.