lkml.org 
[lkml]   [2012]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 5/6] mfd/ab8500: support of hierachical interrupt
From
On Tue, May 1, 2012 at 1:31 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:

> On Tue, Apr 17, 2012 at 09:30:49AM +0200, Linus Walleij wrote:
>> +static irqreturn_t ab8500_hierarchical_irq(int irq, void *dev)
>> +{

>> +     /*  Hierarchical interrupt version */
>> +     for (i = 0; i < AB8500_IT_LATCHHIER_NUM; i++) {
>> +             do {
>> +                     int latch_bit = __ffs(hier_val);
>> +                     do {
>> +                             int int_bit = __ffs(latch_val);
>> +                     } while (latch_val);
>> +             } while (hier_val);
>> +     }
>> +     return IRQ_HANDLED;
>> +}
>
> With 4 nested loops, this one is getting difficult to read. Have you
> considered splitting the loops into separate routines ?

I get the point :-D

Michel do you think this can be done?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-05-02 00:41    [W:0.232 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site