diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2006-03-28 04:56:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:05 -0500 |
commit | 0a945022778f100115d0cb6234eb28fc1b15ccaf (patch) | |
tree | 85df4b5f7dd8bf59557091379c59b23b09115bf6 /include/linux/genhd.h | |
parent | 631d6747e1d877a4baa924cb373b8b9511a53e5e (diff) |
[PATCH] for_each_possible_cpu: fixes for generic part
replaces for_each_cpu with for_each_possible_cpu().
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 3c1b0294a742..10a27f29d692 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -152,14 +152,14 @@ struct disk_attribute { | |||
152 | ({ \ | 152 | ({ \ |
153 | typeof(gendiskp->dkstats->field) res = 0; \ | 153 | typeof(gendiskp->dkstats->field) res = 0; \ |
154 | int i; \ | 154 | int i; \ |
155 | for_each_cpu(i) \ | 155 | for_each_possible_cpu(i) \ |
156 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ | 156 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ |
157 | res; \ | 157 | res; \ |
158 | }) | 158 | }) |
159 | 159 | ||
160 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { | 160 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { |
161 | int i; | 161 | int i; |
162 | for_each_cpu(i) | 162 | for_each_possible_cpu(i) |
163 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, | 163 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, |
164 | sizeof (struct disk_stats)); | 164 | sizeof (struct disk_stats)); |
165 | } | 165 | } |