Skip to content

Commit

Permalink
[S390] cio: use ARRAY_SIZE in device_id.c
Browse files Browse the repository at this point in the history
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Ahmed S. Darwish authored and Martin Schwidefsky committed Feb 12, 2007
1 parent 4dd3cc5 commit 045236a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/cio/device_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>

#include <asm/ccwdev.h>
#include <asm/delay.h>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 045236a

Please sign in to comment.