diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-07-26 12:34:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 14:11:57 -0400 |
commit | 6aa8b04975e71fb3d67bec7fbe2995b9bf54a06e (patch) | |
tree | 2eb8233f350766a3582d5a3dfcf87c3590f44c81 | |
parent | 712aaa1cb1c0a83e5ffb5376e1d7ee3dd539f4e4 (diff) |
cyclone.c: silly use of volatile, __iomem fixes
u32* volatile cyclone_timer means volatile auto pointer to u32,
which is clearly not what had been intended (we never even take
the address of that variable, let alone pass it to something that
could change it behind our back). u32 volatile * is what the
authors apparently wanted to say, but in reality we don't need that
qualifier there at all - it's (properly) only passed to iomem helpers
which takes care of that stuff just fine.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/ia64/kernel/cyclone.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c index 2fd96d9062a1..790ef0d87e12 100644 --- a/arch/ia64/kernel/cyclone.c +++ b/arch/ia64/kernel/cyclone.c | |||
@@ -38,11 +38,11 @@ static struct clocksource clocksource_cyclone = { | |||
38 | 38 | ||
39 | int __init init_cyclone_clock(void) | 39 | int __init init_cyclone_clock(void) |
40 | { | 40 | { |
41 | u64* reg; | 41 | u64 __iomem *reg; |
42 | u64 base; /* saved cyclone base address */ | 42 | u64 base; /* saved cyclone base address */ |
43 | u64 offset; /* offset from pageaddr to cyclone_timer register */ | 43 | u64 offset; /* offset from pageaddr to cyclone_timer register */ |
44 | int i; | 44 | int i; |
45 | u32* volatile cyclone_timer; /* Cyclone MPMC0 register */ | 45 | u32 __iomem *cyclone_timer; /* Cyclone MPMC0 register */ |
46 | 46 | ||
47 | if (!use_cyclone) | 47 | if (!use_cyclone) |
48 | return 0; | 48 | return 0; |
@@ -51,7 +51,7 @@ int __init init_cyclone_clock(void) | |||
51 | 51 | ||
52 | /* find base address */ | 52 | /* find base address */ |
53 | offset = (CYCLONE_CBAR_ADDR); | 53 | offset = (CYCLONE_CBAR_ADDR); |
54 | reg = (u64*)ioremap_nocache(offset, sizeof(u64)); | 54 | reg = ioremap_nocache(offset, sizeof(u64)); |
55 | if(!reg){ | 55 | if(!reg){ |
56 | printk(KERN_ERR "Summit chipset: Could not find valid CBAR" | 56 | printk(KERN_ERR "Summit chipset: Could not find valid CBAR" |
57 | " register.\n"); | 57 | " register.\n"); |
@@ -69,7 +69,7 @@ int __init init_cyclone_clock(void) | |||
69 | 69 | ||
70 | /* setup PMCC */ | 70 | /* setup PMCC */ |
71 | offset = (base + CYCLONE_PMCC_OFFSET); | 71 | offset = (base + CYCLONE_PMCC_OFFSET); |
72 | reg = (u64*)ioremap_nocache(offset, sizeof(u64)); | 72 | reg = ioremap_nocache(offset, sizeof(u64)); |
73 | if(!reg){ | 73 | if(!reg){ |
74 | printk(KERN_ERR "Summit chipset: Could not find valid PMCC" | 74 | printk(KERN_ERR "Summit chipset: Could not find valid PMCC" |
75 | " register.\n"); | 75 | " register.\n"); |
@@ -81,7 +81,7 @@ int __init init_cyclone_clock(void) | |||
81 | 81 | ||
82 | /* setup MPCS */ | 82 | /* setup MPCS */ |
83 | offset = (base + CYCLONE_MPCS_OFFSET); | 83 | offset = (base + CYCLONE_MPCS_OFFSET); |
84 | reg = (u64*)ioremap_nocache(offset, sizeof(u64)); | 84 | reg = ioremap_nocache(offset, sizeof(u64)); |
85 | if(!reg){ | 85 | if(!reg){ |
86 | printk(KERN_ERR "Summit chipset: Could not find valid MPCS" | 86 | printk(KERN_ERR "Summit chipset: Could not find valid MPCS" |
87 | " register.\n"); | 87 | " register.\n"); |
@@ -93,7 +93,7 @@ int __init init_cyclone_clock(void) | |||
93 | 93 | ||
94 | /* map in cyclone_timer */ | 94 | /* map in cyclone_timer */ |
95 | offset = (base + CYCLONE_MPMC_OFFSET); | 95 | offset = (base + CYCLONE_MPMC_OFFSET); |
96 | cyclone_timer = (u32*)ioremap_nocache(offset, sizeof(u32)); | 96 | cyclone_timer = ioremap_nocache(offset, sizeof(u32)); |
97 | if(!cyclone_timer){ | 97 | if(!cyclone_timer){ |
98 | printk(KERN_ERR "Summit chipset: Could not find valid MPMC" | 98 | printk(KERN_ERR "Summit chipset: Could not find valid MPMC" |
99 | " register.\n"); | 99 | " register.\n"); |
@@ -110,7 +110,7 @@ int __init init_cyclone_clock(void) | |||
110 | printk(KERN_ERR "Summit chipset: Counter not counting!" | 110 | printk(KERN_ERR "Summit chipset: Counter not counting!" |
111 | " DISABLED\n"); | 111 | " DISABLED\n"); |
112 | iounmap(cyclone_timer); | 112 | iounmap(cyclone_timer); |
113 | cyclone_timer = 0; | 113 | cyclone_timer = NULL; |
114 | use_cyclone = 0; | 114 | use_cyclone = 0; |
115 | return -ENODEV; | 115 | return -ENODEV; |
116 | } | 116 | } |