[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440812252023tde74068y83f83efdca00eb8d@mail.gmail.com>
Date: Thu, 25 Dec 2008 20:23:01 -0800
From: "Yinghai Lu" <yinghai@...nel.org>
To: "KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc: LKML <linux-kernel@...r.kernel.org>, "Ingo Molnar" <mingo@...e.hu>
Subject: Re: [PATCH for -tip 4/4] irq: for_each_irq_desc() makes simplify
On Thu, Dec 25, 2008 at 7:29 PM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
> Subject: [PATCH] irq: for_each_irq_desc() makes simplify
> Impact: cleanup
>
> all for_each_irq_desc() usage point have !desc check.
> then its check can move into for_each_irq_desc() macro.
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
> CC: Yinghai Lu <yinghai@...nel.org>
> CC: Ingo Molnar <mingo@...e.hu>
> ---
> arch/x86/kernel/io_apic.c | 10 ----------
> drivers/xen/events.c | 3 ---
> include/linux/irqnr.h | 8 ++++++--
> kernel/irq/autoprobe.c | 15 ---------------
> kernel/irq/handle.c | 3 ---
> kernel/irq/spurious.c | 5 -----
> 6 files changed, 6 insertions(+), 38 deletions(-)
>
> Index: b/arch/x86/kernel/io_apic.c
> ===================================================================
> --- a/arch/x86/kernel/io_apic.c
> +++ b/arch/x86/kernel/io_apic.c
> @@ -1400,8 +1400,6 @@ void __setup_vector_irq(int cpu)
>
> /* Mark the inuse vectors */
> for_each_irq_desc(irq, desc) {
> - if (!desc)
> - continue;
> cfg = desc->chip_data;
> if (!cpumask_test_cpu(cpu, cfg->domain))
> continue;
..
> Index: b/include/linux/irqnr.h
> ===================================================================
> --- a/include/linux/irqnr.h
> +++ b/include/linux/irqnr.h
> @@ -25,10 +25,14 @@ extern struct irq_desc *irq_to_desc(unsi
>
> # define for_each_irq_desc(irq, desc) \
> for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
> - irq++, desc = irq_to_desc(irq))
> + irq++, desc = irq_to_desc(irq)) \
> + if (desc)
> +
> +
looks good.
YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists