Messages in this thread | | | Date | Thu, 25 Dec 2008 19:01:09 +0300 | From | Cyrill Gorcunov <> | Subject | Re: [PATCH for -tip] irq: for_each_irq_desc() makes simplify |
| |
[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.
Nevermind, Kosaki, since it's only me who is confused I should just shut up :-)
| | > For me for_each_irq_desc | > implies to iterate over each irq_desc allocated regardles of internal | > descriptor data. For example in list_struct we have a special test if | > entry is empty or not. So I think hiding details is not that good (and | > that is why I was asking for more descriptive macro name). BUT if it | > really supposed to behave like that then I don't object :) | - Cyrill -
| |