diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:02:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 14:02:31 -0400 |
commit | c513b67e68787eceafeede32bcd0edbee45c0006 (patch) | |
tree | 91affc9a29a20b339b3c88ae3ee1e99eba49dc2b /drivers/pci | |
parent | 90c8327cad5d7c2d5d7d3e761d17af1925474107 (diff) |
pci: fix type warnings in intr_remapping.c
Commit 69309a059075 ("x86, asm: Clean up and simplify set_64bit()")
sanitized the x86-64 types to set_64bit(), and incidentally resulted in
warnings like
drivers/pci/intr_remapping.c: In function 'modify_irte':
drivers/pci/intr_remapping.c:314: warning: passing argument 1 of 'set_64bit' from incompatible pointer type
arch/x86/include/asm/cmpxchg_64.h:6: note:expected 'volatile u64 *' but argument is of type 'long unsigned int *'
It turns out that the change to set_64bit() really does clean up things,
and the PCI intr_remapping.c file did a rather ugly cast in order to
avoid warnings with the previous set_64bit() type model.
Removing the ugly cast fixes the warning, and makes everybody happy and
expects a set_64bit() to take the logical "u64 *" argument.
Pointed-out-by: Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/intr_remapping.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 1315ac688aa2..1694a0e2845b 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -311,8 +311,8 @@ int modify_irte(int irq, struct irte *irte_modified) | |||
311 | index = irq_iommu->irte_index + irq_iommu->sub_handle; | 311 | index = irq_iommu->irte_index + irq_iommu->sub_handle; |
312 | irte = &iommu->ir_table->base[index]; | 312 | irte = &iommu->ir_table->base[index]; |
313 | 313 | ||
314 | set_64bit((unsigned long *)&irte->low, irte_modified->low); | 314 | set_64bit(&irte->low, irte_modified->low); |
315 | set_64bit((unsigned long *)&irte->high, irte_modified->high); | 315 | set_64bit(&irte->high, irte_modified->high); |
316 | __iommu_flush_cache(iommu, irte, sizeof(*irte)); | 316 | __iommu_flush_cache(iommu, irte, sizeof(*irte)); |
317 | 317 | ||
318 | rc = qi_flush_iec(iommu, index, 0); | 318 | rc = qi_flush_iec(iommu, index, 0); |
@@ -393,8 +393,8 @@ static int clear_entries(struct irq_2_iommu *irq_iommu) | |||
393 | end = start + (1 << irq_iommu->irte_mask); | 393 | end = start + (1 << irq_iommu->irte_mask); |
394 | 394 | ||
395 | for (entry = start; entry < end; entry++) { | 395 | for (entry = start; entry < end; entry++) { |
396 | set_64bit((unsigned long *)&entry->low, 0); | 396 | set_64bit(&entry->low, 0); |
397 | set_64bit((unsigned long *)&entry->high, 0); | 397 | set_64bit(&entry->high, 0); |
398 | } | 398 | } |
399 | 399 | ||
400 | return qi_flush_iec(iommu, index, irq_iommu->irte_mask); | 400 | return qi_flush_iec(iommu, index, irq_iommu->irte_mask); |