Re: drivers/gpio/gpio-stmpe.c:412: bad if test ?

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

 



I think this need to be discussed with Patrice.

Sorry for top-posting.

Yours,
Linus Walleij

On Mon, Oct 17, 2016 at 1:21 PM, David Binderman <dcb314@xxxxxxxxxxx> wrote:
> Hello there,
>
> drivers/gpio/gpio-stmpe.c:412:34: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
>
> Source code is
>
>         if (stmpe->partnum != STMPE801 || stmpe->partnum != STMPE1600 ||
>             stmpe->partnum != STMPE1801) {
>
> Maybe better code
>
>         if (stmpe->partnum != STMPE801 && stmpe->partnum != STMPE1600 &&
>             stmpe->partnum != STMPE1801) {
>
> Regards
>
> David Binderman
>
>
>
>
--
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