aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-13 22:31:21 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-09-26 09:45:18 -0400
commit0327dab0e88b2f4be6ad7dcd5af86d085d2c0603 (patch)
tree8e4bd7c8ad81d7a0c432fa6b21cec468e207456c /arch/s390/kernel
parentd3feb481083636296f25daf36dbf44493fa7e1f2 (diff)
s390/topology: use for_each_set_bit to simplify the code
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>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/topology.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 30c8533b8d4e..54d93f4b6818 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -73,10 +73,7 @@ static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu,
73{ 73{
74 unsigned int cpu; 74 unsigned int cpu;
75 75
76 for (cpu = find_first_bit(&tl_cpu->mask[0], TOPOLOGY_CPU_BITS); 76 for_each_set_bit(cpu, &tl_cpu->mask[0], TOPOLOGY_CPU_BITS) {
77 cpu < TOPOLOGY_CPU_BITS;
78 cpu = find_next_bit(&tl_cpu->mask[0], TOPOLOGY_CPU_BITS, cpu + 1))
79 {
80 unsigned int rcpu; 77 unsigned int rcpu;
81 int lcpu; 78 int lcpu;
82 79