diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-30 22:05:11 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-30 22:05:11 +1030 |
commit | af76aba00fdcfb21535c9f9872245d14097a4561 (patch) | |
tree | 221ec0b2cd01c7629abc1f30f0f563e1731c1683 | |
parent | 1a2142afa5646ad5af44bbe1febaa5e0b7e71156 (diff) | |
download | kernel_samsung_espresso10-af76aba00fdcfb21535c9f9872245d14097a4561.zip kernel_samsung_espresso10-af76aba00fdcfb21535c9f9872245d14097a4561.tar.gz kernel_samsung_espresso10-af76aba00fdcfb21535c9f9872245d14097a4561.tar.bz2 |
cpumask: fix seq_bitmap_*() functions.
1) seq_bitmap_list() should take a const.
2) All the seq_bitmap should use cpumask_bits().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | fs/seq_file.c | 2 | ||||
-rw-r--r-- | include/linux/seq_file.h | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c index a1a4cfe..7f40f30 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -513,7 +513,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits, } EXPORT_SYMBOL(seq_bitmap); -int seq_bitmap_list(struct seq_file *m, unsigned long *bits, +int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, unsigned int nr_bits) { if (m->count < m->size) { diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index f616f31..004f3b3 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits, unsigned int nr_bits); static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) { - return seq_bitmap(m, mask->bits, nr_cpu_ids); + return seq_bitmap(m, cpumask_bits(mask), nr_cpu_ids); } static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) @@ -63,12 +63,13 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) return seq_bitmap(m, mask->bits, MAX_NUMNODES); } -int seq_bitmap_list(struct seq_file *m, unsigned long *bits, +int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, unsigned int nr_bits); -static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask) +static inline int seq_cpumask_list(struct seq_file *m, + const struct cpumask *mask) { - return seq_bitmap_list(m, mask->bits, NR_CPUS); + return seq_bitmap_list(m, cpumask_bits(mask), nr_cpu_ids); } static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) |