lkml.org 
[lkml]   [2009]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Fix Intel IOMMU Compilation Warnings on IA64
From
Date
On Wed, 2009-05-13 at 16:13 -0700, Fenghua Yu wrote:
> Compiling kernel on IA64 reports two warnings in intel-iommu.c:
>
> drivers/pci/intel-iommu.c:3150: warning: format ?%llx? expects
> type ?long long unsigned int?, but argument 4 has type ?u64?
> drivers/pci/intel-iommu.c: In function ?intel_iommu_map_range?:
> drivers/pci/intel-iommu.c:3201: warning: format ?%llx? expects
> type ?long long unsigned int?, but argument 4 has type ?u64?

Charset corruption there? I'm sure GCC didn't actually use question
marks...

> The warnings are fixed by adding type cast unsigned long long.
>
> Signed-off-by: Fenghua Yu <fegnhua.yu@intel.com>
>
> ---
>
> intel-iommu.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
> index a563fbe..6f8cc21 100644
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -3147,7 +3147,8 @@ static int intel_iommu_attach_device(struct
> iommu_domain *domain,
> if (end < dmar_domain->max_addr) {
> printk(KERN_ERR "%s: iommu agaw (%d) is not "
> "sufficient for the mapped address (%llx)\n",
> - __func__, iommu->agaw, dmar_domain->max_addr);
> + __func__, iommu->agaw,
> + (unsigned long long)dmar_domain->max_addr);
> return -EFAULT;
> }

Perhaps this would be better, modelled after commit fe333321:

diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h
index e36b371..b0ecc20 100644
--- a/arch/ia64/include/asm/types.h
+++ b/arch/ia64/include/asm/types.h
@@ -13,7 +13,11 @@
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
*/

+#ifdef __KERNEL__
+#include <asm-generic/int-ll64.h>
+#else
#include <asm-generic/int-l64.h>
+#endif

#ifdef __ASSEMBLY__
# define __IA64_UL(x) (x)
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation



\
 
 \ /
  Last update: 2009-05-14 17:21    [W:0.167 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site