diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-07-30 06:03:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:38 -0400 |
commit | 25c8716cb08dea386c7d6220b82eba732ccbf976 (patch) | |
tree | ec5a4d986440b5c93186fafb4ebc0f4f1ad44dcc /arch/alpha/kernel/osf_sys.c | |
parent | c8e5429e49dcf5243a2dc293cb11f53d65d5fca9 (diff) |
[PATCH] arch/alpha: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
duplicate of the macro. Also remove some trailing whitespaces and needless
braces.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index e15dcf4f3dcd..73c7622b5297 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -623,12 +623,12 @@ osf_sysinfo(int command, char __user *buf, long count) | |||
623 | long len, err = -EINVAL; | 623 | long len, err = -EINVAL; |
624 | 624 | ||
625 | offset = command-1; | 625 | offset = command-1; |
626 | if (offset >= sizeof(sysinfo_table)/sizeof(char *)) { | 626 | if (offset >= ARRAY_SIZE(sysinfo_table)) { |
627 | /* Digital UNIX has a few unpublished interfaces here */ | 627 | /* Digital UNIX has a few unpublished interfaces here */ |
628 | printk("sysinfo(%d)", command); | 628 | printk("sysinfo(%d)", command); |
629 | goto out; | 629 | goto out; |
630 | } | 630 | } |
631 | 631 | ||
632 | down_read(&uts_sem); | 632 | down_read(&uts_sem); |
633 | res = sysinfo_table[offset]; | 633 | res = sysinfo_table[offset]; |
634 | len = strlen(res)+1; | 634 | len = strlen(res)+1; |