提交 fc89db4b 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

s390/char: use for_each_clear_bit()

Use for_each_clear_bit() to iterate over all the cleared bit in a
memory region.
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c527b414
...@@ -441,9 +441,8 @@ static int sclp_mem_notifier(struct notifier_block *nb, ...@@ -441,9 +441,8 @@ static int sclp_mem_notifier(struct notifier_block *nb,
start = arg->start_pfn << PAGE_SHIFT; start = arg->start_pfn << PAGE_SHIFT;
size = arg->nr_pages << PAGE_SHIFT; size = arg->nr_pages << PAGE_SHIFT;
mutex_lock(&sclp_mem_mutex); mutex_lock(&sclp_mem_mutex);
for (id = 0; id <= sclp_max_storage_id; id++) for_each_clear_bit(id, sclp_storage_ids, sclp_max_storage_id + 1)
if (!test_bit(id, sclp_storage_ids)) sclp_attach_storage(id);
sclp_attach_storage(id);
switch (action) { switch (action) {
case MEM_ONLINE: case MEM_ONLINE:
case MEM_GOING_OFFLINE: case MEM_GOING_OFFLINE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册