[patch 1/3] x86: io-apic - use ARRAY_SIZE macro

Previous thread: DVB Update [PATCH 18/31] multiproto tree by Manu Abraham on Thursday, September 4, 2008 - 11:39 am. (1 message)

Next thread: DVB Update [PATCH 19/31] multiproto tree by Manu Abraham on Thursday, September 4, 2008 - 11:39 am. (1 message)
From: Cyrill Gorcunov
Date: Thursday, September 4, 2008 - 11:37 am

Make the code width a bit shorter with ARRAY_SIZE macro.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/io_apic.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/io_apic.c	2008-09-04 20:34:14.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/io_apic.c	2008-09-04 21:35:48.000000000 +0400
@@ -166,7 +166,7 @@ static void __init init_work(void *data)
 
 	memcpy(cfg, irq_cfg_legacy, sizeof(irq_cfg_legacy));
 
-	legacy_count = sizeof(irq_cfg_legacy)/sizeof(irq_cfg_legacy[0]);
+	legacy_count = ARRAY_SIZE(irq_cfg_legacy);
 	for (i = legacy_count; i < *da->nr; i++)
 		init_one_irq_cfg(&cfg[i]);
 

-- 
--

From: Ingo Molnar
Date: Friday, September 5, 2008 - 1:02 am

applied to tip/irq/sparseirq (which is hosting the IO-APIC unification 
series) - thanks Cyrill.

	Ingo
--

Previous thread: DVB Update [PATCH 18/31] multiproto tree by Manu Abraham on Thursday, September 4, 2008 - 11:39 am. (1 message)

Next thread: DVB Update [PATCH 19/31] multiproto tree by Manu Abraham on Thursday, September 4, 2008 - 11:39 am. (1 message)