提交 045236ab 编写于 作者: A Ahmed S. Darwish 提交者: Martin Schwidefsky

[S390] cio: use ARRAY_SIZE in device_id.c

Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NAhmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 4dd3cc5c
......@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <asm/ccwdev.h>
#include <asm/delay.h>
......@@ -138,7 +139,7 @@ VM_virtual_device_info (__u16 devno, struct senseid *ps)
ps->cu_model = 0x60;
return;
}
for (i = 0; i < sizeof(vm_devices) / sizeof(vm_devices[0]); i++)
for (i = 0; i < ARRAY_SIZE(vm_devices); i++)
if (diag_data.vrdcvcla == vm_devices[i].vrdcvcla &&
diag_data.vrdcvtyp == vm_devices[i].vrdcvtyp) {
ps->cu_type = vm_devices[i].cu_type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册