mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yinghai@kernel.org>
To: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>, "Ingo Molnar" <mingo@elte.hu>
Subject: Re: [PATCH for -tip 4/4] irq: for_each_irq_desc() makes simplify
Date: Thu, 25 Dec 2008 20:23:01 -0800	[thread overview]
Message-ID: <86802c440812252023tde74068y83f83efdca00eb8d@mail.gmail.com> (raw)
In-Reply-To: <20081226122830.5CAF.KOSAKI.MOTOHIRO@jp.fujitsu.com>

On Thu, Dec 25, 2008 at 7:29 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.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@jp.fujitsu.com>
> CC: Yinghai Lu <yinghai@kernel.org>
> CC: Ingo Molnar <mingo@elte.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

  reply	other threads:[~2008-12-26  4:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26  3:21 [PATCH for -tip 0/4] various irq cleanups KOSAKI Motohiro
2008-12-26  3:23 ` [PATCH for -tip 1/4] hrtimer: remove #include <linux/irq.h> KOSAKI Motohiro
2008-12-26  3:24 ` [PATCH for -tip 2/4] irq: for_each_irq_desc() move to irqnr.h KOSAKI Motohiro
2008-12-26  3:28 ` [PATCH for -tip 3/4] proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c KOSAKI Motohiro
2008-12-26  4:18   ` Yinghai Lu
2008-12-26  4:21     ` KOSAKI Motohiro
2008-12-26  4:36       ` Yinghai Lu
2008-12-26  5:24         ` KOSAKI Motohiro
2008-12-26  5:59           ` Yinghai Lu
2008-12-26  8:49             ` Ingo Molnar
2008-12-26  3:29 ` [PATCH for -tip 4/4] irq: for_each_irq_desc() makes simplify KOSAKI Motohiro
2008-12-26  4:23   ` Yinghai Lu [this message]
2009-01-01 18:05   ` Raja R Harinath
2009-01-02  5:56     ` KOSAKI Motohiro
2009-01-03 18:11       ` KOSAKI Motohiro
2009-01-07 22:18         ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86802c440812252023tde74068y83f83efdca00eb8d@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®