From: "Cyrill Gorcunov" <gorcunov@gmail.com>
To: "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>
Cc: "Ingo Molnar" <mingo@elte.hu>, "Yinghai Lu" <yinghai@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH for -tip] irq: for_each_irq_desc() makes simplify
Date: Fri, 26 Dec 2008 12:37:53 +0300 [thread overview]
Message-ID: <aa79d98a0812260137l73de751fuffaac6dff3c3a22a@mail.gmail.com> (raw)
In-Reply-To: <20081226101754.85DB.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Fri, Dec 26, 2008 at 4:22 AM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>> [KOSAKI Motohiro - Thu, Dec 25, 2008 at 11:43:45PM +0900]
>> | > | "if (!desc) " mean this irqno don't have irq description.
>> | > | so I think this name imply mean skipping no irq desctiption element.
>> | > |
>> | > | Actually, on CONFIG_SPARSEIRQ, desc is filled in dynamically after booting.
>> | > | then "defined" is a bit misleading word.
>> | > |
>> | >
>> | > So if I would need to iterate over all descriptors including empty
>> | > I need to type all this long for(;;) form again?
>> |
>> | We already have for_each_irq_nr() for this purpose ;-)
>>
>> Which is not shorter form of desc iterator in turn :-)
>>
>> Since the original for_each_irq_desc didn't check for NULL
>> desc's I think the better would to name it like for_each_irq_desc_safe
>> or for_each_irq_desc_inuse then.
>
> but before CONFIG_SPARSEIRQ feature age, for_each_irq_desc() guaranteed
> to return !NULL value.
> recently CONFIG_SPARSEIRQ break this assumption. I hope to restore it.
indeed
>
> In addition, if we make both for_each_irq_desc() and for_each_irq_desc().
> for_each_irq_desc() become unused macro.
> from cleanup view, unused function/macro is not preferred.
>
yeah!
next prev parent reply other threads:[~2008-12-26 9:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-25 10:46 [PATCH for -tip] proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c KOSAKI Motohiro
2008-12-25 10:59 ` Ingo Molnar
2008-12-25 11:00 ` KOSAKI Motohiro
2008-12-25 12:40 ` KOSAKI Motohiro
2008-12-25 12:41 ` [PATCH for -tip] irq: for_each_irq_desc() makes simplify KOSAKI Motohiro
2008-12-25 13:10 ` Cyrill Gorcunov
2008-12-25 13:45 ` KOSAKI Motohiro
2008-12-25 14:31 ` Cyrill Gorcunov
2008-12-25 14:43 ` KOSAKI Motohiro
2008-12-25 16:01 ` Cyrill Gorcunov
2008-12-26 1:22 ` KOSAKI Motohiro
2008-12-26 9:37 ` Cyrill Gorcunov [this message]
2008-12-25 16:49 ` Ingo Molnar
2008-12-25 14:46 ` [PATCH for -tip] proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c KOSAKI Motohiro
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=aa79d98a0812260137l73de751fuffaac6dff3c3a22a@mail.gmail.com \
--to=gorcunov@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yinghai@kernel.org \
/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
Powered by JetHome