Re: [PATCH v2] gpio: mmio: Also read bits that are zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 16, 2018 at 12:20 PM, Lukas Wunner <lukas@xxxxxxxxx> wrote:
> On Tue, Jan 16, 2018 at 12:00:31PM +0100, Linus Walleij wrote:
>> +     bit = -1;
>> +     while ((bit = find_next_bit(mask, gc->ngpio, bit + 1)) < gc->ngpio)
>>               readmask |= bgpio_line2mask(gc, bit);
>
> Amend include/linux/bitrev.h with a bitrev64() macro.
>
> Further amend it with a bitrevul() macro which calls bitrev32() or
> bitrev(64) depending on the arch's unsigned long size.
>
> Then use bitrevul() on mask and the rest is just OR/AND operations
> (instead of the while loop).

I hear you! :)

But can we do it as an improvement on top of the bugfix now that we
need to get something in before the merge window?

I would need acks and stuff to change bitrev.h and that may take
weeks.

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux