Skip to content

Commit

Permalink
s390/topology: use for_each_set_bit to simplify the code
Browse files Browse the repository at this point in the history
Use for_each_set_bit() to simplify the code.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Wei Yongjun authored and Martin Schwidefsky committed Sep 26, 2012
1 parent d3feb48 commit 0327dab
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/s390/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu,
{
unsigned int cpu;

for (cpu = find_first_bit(&tl_cpu->mask[0], TOPOLOGY_CPU_BITS);
cpu < TOPOLOGY_CPU_BITS;
cpu = find_next_bit(&tl_cpu->mask[0], TOPOLOGY_CPU_BITS, cpu + 1))
{
for_each_set_bit(cpu, &tl_cpu->mask[0], TOPOLOGY_CPU_BITS) {
unsigned int rcpu;
int lcpu;

Expand Down

0 comments on commit 0327dab

Please sign in to comment.