Re: [PATCH 04/54] gpio: ich: Be sure to clamp return value

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

 



On Wed, Dec 23, 2015 at 5:59 PM, Aaron Sierra <asierra@xxxxxxxxxxx> wrote:

>> -             return (data >> 16) & (1 << nr) ? 1 : 0;
>> +             return !!((data >> 16) & (1 << nr));
>
> Linus,
> Is this particular change done to simplify verification via Coccinelle? Otherwise,
> this value is already clamped to 0/1.

No this was my manual inspection, which isn't very accurate. When
in doubt, I made a patch. I'll drop this then, thanks!

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