summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/osf_sys.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-07-30 12:03:23 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 22:28:38 +0200
commit25c8716cb08dea386c7d6220b82eba732ccbf976 (patch)
treeec5a4d986440b5c93186fafb4ebc0f4f1ad44dcc /arch/alpha/kernel/osf_sys.c
parent[PATCH] i386: fix CONFIG_EFI help (diff)
downloadlinux-25c8716cb08dea386c7d6220b82eba732ccbf976.tar.xz
linux-25c8716cb08dea386c7d6220b82eba732ccbf976.zip
[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.c4
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)
long len, err = -EINVAL;
offset = command-1;
- if (offset >= sizeof(sysinfo_table)/sizeof(char *)) {
+ if (offset >= ARRAY_SIZE(sysinfo_table)) {
/* Digital UNIX has a few unpublished interfaces here */
printk("sysinfo(%d)", command);
goto out;
}
-
+
down_read(&uts_sem);
res = sysinfo_table[offset];
len = strlen(res)+1;