lkml.org 
[lkml]   [2008]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH for -tip] irq: for_each_irq_desc() makes simplify
Date
> [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.

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.

>
> Nevermind, Kosaki, since it's only me who is confused I should
> just shut up :-)






\
 
 \ /
  Last update: 2008-12-26 02:25    [W:0.054 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site