diff options
author | Keith Owens <kaos@sgi.com> | 2006-07-17 15:41:59 +1000 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-08-02 16:03:44 -0700 |
commit | e037cda559547e6353c5a792802963572d0b750e (patch) | |
tree | 5e76f7706d30d725f4bc80dd9b460f8a5c2da005 /arch/ia64 | |
parent | 4f2ef124b274baac80f64e290aa44e87a7753933 (diff) | |
download | linux-3.10-e037cda559547e6353c5a792802963572d0b750e.tar.gz linux-3.10-e037cda559547e6353c5a792802963572d0b750e.tar.bz2 linux-3.10-e037cda559547e6353c5a792802963572d0b750e.zip |
[IA64] sparse cleanups
Fix some sparse warnings on ia64. Large constants that should be long
instead of int. Use NULL instead of 0. Add some missing __iomem
casts. Replace a non-C99 structure assignment.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/efi.c | 6 | ||||
-rw-r--r-- | arch/ia64/mm/ioremap.c | 6 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_main.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/pci/tioce_provider.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index e4bfa9dafbc..bb8770a177b 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -632,7 +632,7 @@ kern_memory_descriptor (unsigned long phys_addr) if (phys_addr - md->start < (md->num_pages << EFI_PAGE_SHIFT)) return md; } - return 0; + return NULL; } static efi_memory_desc_t * @@ -652,7 +652,7 @@ efi_memory_descriptor (unsigned long phys_addr) if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT)) return md; } - return 0; + return NULL; } u32 @@ -923,7 +923,7 @@ find_memmap_space (void) void efi_memmap_init(unsigned long *s, unsigned long *e) { - struct kern_memdesc *k, *prev = 0; + struct kern_memdesc *k, *prev = NULL; u64 contig_low=0, contig_high=0; u64 as, ae, lim; void *efi_map_start, *efi_map_end, *p, *q; diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c index 07bd02b6c37..4280c074d64 100644 --- a/arch/ia64/mm/ioremap.c +++ b/arch/ia64/mm/ioremap.c @@ -32,7 +32,7 @@ ioremap (unsigned long offset, unsigned long size) */ attr = kern_mem_attribute(offset, size); if (attr & EFI_MEMORY_WB) - return phys_to_virt(offset); + return (void __iomem *) phys_to_virt(offset); else if (attr & EFI_MEMORY_UC) return __ioremap(offset, size); @@ -43,7 +43,7 @@ ioremap (unsigned long offset, unsigned long size) gran_base = GRANULEROUNDDOWN(offset); gran_size = GRANULEROUNDUP(offset + size) - gran_base; if (efi_mem_attribute(gran_base, gran_size) & EFI_MEMORY_WB) - return phys_to_virt(offset); + return (void __iomem *) phys_to_virt(offset); return __ioremap(offset, size); } @@ -53,7 +53,7 @@ void __iomem * ioremap_nocache (unsigned long offset, unsigned long size) { if (kern_mem_attribute(offset, size) & EFI_MEMORY_WB) - return 0; + return NULL; return __ioremap(offset, size); } diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 99b123a6421..5e8e59efb34 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -480,7 +480,7 @@ xpc_activating(void *__partid) partid_t partid = (u64) __partid; struct xpc_partition *part = &xpc_partitions[partid]; unsigned long irq_flags; - struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 }; + struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 }; int ret; diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index 17cd3428488..af7171adcd2 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c @@ -74,7 +74,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr) else mmr_war_offset = 0x158; - readq_relaxed((void *)(mmr_base + mmr_war_offset)); + readq_relaxed((void __iomem *)(mmr_base + mmr_war_offset)); } } @@ -92,8 +92,8 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) if (mmr_offset < 0x45000) { if (mmr_offset == 0x100) - readq_relaxed((void *)(mmr_base + 0x38)); - readq_relaxed((void *)(mmr_base + 0xb050)); + readq_relaxed((void __iomem *)(mmr_base + 0x38)); + readq_relaxed((void __iomem *)(mmr_base + 0xb050)); } } |