mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
1a2142afa5
commit
af76aba00f
2 changed files with 6 additions and 5 deletions
|
@ -513,7 +513,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(seq_bitmap);
|
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)
|
unsigned int nr_bits)
|
||||||
{
|
{
|
||||||
if (m->count < m->size) {
|
if (m->count < m->size) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits,
|
||||||
unsigned int nr_bits);
|
unsigned int nr_bits);
|
||||||
static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)
|
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)
|
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);
|
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);
|
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)
|
static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask)
|
||||||
|
|
Loading…
Reference in a new issue