Re: [PATCH] intel-iommu: fix compile warnings

From: Ingo Molnar
Date: Wed Nov 19 2008 - 03:30:00 EST



* FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote:

> I got the following warnings on IA64:
>
> linux-2.6/drivers/pci/intel-iommu.c: In function 'init_dmars':
> linux-2.6/drivers/pci/intel-iommu.c:1658: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'
> linux-2.6/drivers/pci/intel-iommu.c:1663: warning: format '%Lx' expects type 'long long unsigned int', but argument 2 has type 'u64'

applied to tip/core/urgent, thanks!

Note, i extended the changelog, see the commit attached below.

I think in 2.6.29 we want to convert struct dmar_drhd_unit's
->reg_base_addr to the phys_addr_t type, and use the %pR extension to
print it out.

There's other files affected as well by this type problem:
drivers/pci/intr_remapping.c for example - it's just not built on ia64
right now because it depends on CONFIG_INTR_REMAP which is only 64-bit
x86.

Some goes for other fields as well:

u64 base_address; /* reserved base address*/
u64 end_address; /* reserved end address */

(and some other variables in dmar.c as well)

Would you be interested in sending a patch for this wider cleanup?

It will be a pure cleanup with no functional complications as DMAR is
only available on 64-bit platforms so phys_addr_t is always 64 bits
wide - but it will help avoid such problems that u64 types
historically have.

Ingo

------------->