]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: gpiolib: don't compare an unsigned for >= 0
authorDirk Behme <dirk.behme@gmail.com>
Tue, 18 Aug 2015 16:02:32 +0000 (18:02 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 2 Oct 2015 11:19:35 +0000 (04:19 -0700)
commit374528f8e2030e56fd9b6e0774cce2be435729d9
tree6e79a1b7e386c9d36f93072f76d6d168bd684487
parent9a1e4d1a824a2094e7b01e8af773ef9b2cbce47c
gpio: gpiolib: don't compare an unsigned for >= 0

The parameter offset is an unsigned, so it makes no sense to compare
it for >= 0. Fix the compiler warning regarding this by removing this
comparison.

As the macro GPIO_OFFSET_VALID is only used at this single place, simplify
the code by dropping the macro completely and dropping the invert, too.

No functional change.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c