summaryrefslogtreecommitdiff
path: root/arch/alpha/kernel/err_ev7.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-07-30 14:03:23 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-01 00:28:38 +0400
commit25c8716cb08dea386c7d6220b82eba732ccbf976 (patch)
treeec5a4d986440b5c93186fafb4ebc0f4f1ad44dcc /arch/alpha/kernel/err_ev7.c
parentc8e5429e49dcf5243a2dc293cb11f53d65d5fca9 (diff)
downloadlinux-25c8716cb08dea386c7d6220b82eba732ccbf976.tar.xz
[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/err_ev7.c')
-rw-r--r--arch/alpha/kernel/err_ev7.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c
index bf52ba691957..fed6b3d1b803 100644
--- a/arch/alpha/kernel/err_ev7.c
+++ b/arch/alpha/kernel/err_ev7.c
@@ -274,16 +274,14 @@ ev7_process_pal_subpacket(struct el_subpacket *header)
struct el_subpacket_handler ev7_pal_subpacket_handler =
SUBPACKET_HANDLER_INIT(EL_CLASS__PAL, ev7_process_pal_subpacket);
-void
+void
ev7_register_error_handlers(void)
{
int i;
- for(i = 0;
- i<sizeof(el_ev7_pal_annotations)/sizeof(el_ev7_pal_annotations[1]);
- i++) {
+ for (i = 0; i < ARRAY_SIZE(el_ev7_pal_annotations); i++)
cdl_register_subpacket_annotation(&el_ev7_pal_annotations[i]);
- }
+
cdl_register_subpacket_handler(&ev7_pal_subpacket_handler);
}