diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-06-08 22:23:48 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 10:45:30 -0500 |
commit | 6391a11375de5e2bb1eb8481e54619761dc65d9f (patch) | |
tree | 956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/qla1280.c | |
parent | 9dc399de0840a478adb71278becf598d3ab3aacc (diff) | |
download | op-kernel-dev-6391a11375de5e2bb1eb8481e54619761dc65d9f.zip op-kernel-dev-6391a11375de5e2bb1eb8481e54619761dc65d9f.tar.gz |
[SCSI] drivers/scsi: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of the macro.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r-- | drivers/scsi/qla1280.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 5a48e55..77bb235 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -4239,15 +4239,12 @@ qla1280_get_token(char *str) { char *sep; long ret = -1; - int i, len; - - len = sizeof(setup_token)/sizeof(struct setup_tokens); + int i; sep = strchr(str, ':'); if (sep) { - for (i = 0; i < len; i++){ - + for (i = 0; i < ARRAY_SIZE(setup_token); i++) { if (!strncmp(setup_token[i].token, str, (sep - str))) { ret = setup_token[i].val; break; |