[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vf8ChDopMygXPj05+hivUtymt+i=WDOVKrB=dPt7Sp1Pw@mail.gmail.com>
Date:   Fri, 23 Feb 2018 14:40:20 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dou Liyang <douly.fnst@...fujitsu.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, ebiederm@...ssion.com,
        Baoquan He <bhe@...hat.com>
Subject: Re: [PATCH v3 2/2] x86/apic: Replace common tools with new ones
On Fri, Feb 23, 2018 at 9:54 AM, Dou Liyang <douly.fnst@...fujitsu.com> wrote:
> The pending interrupt check code is old, update the following code.
>
>   -Replace for() with for_each_set_bit()
> -                       for (j = 31; j >= 0; j--) {
> -                               if (value & (1<<j)) {
> +                       for_each_set_bit(j, &value, 32) {
for_each_set_bit(), mind 'set' part, is equivalent to for-if pair...
> +                               if (j) {
...here you just exclude bit 0 from consideration by unknown reason.
>                                         ack_APIC_irq();
>                                         acked++;
>                                 }
>                         }
-- 
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists
 
