Messages in this thread | | | Date | Mon, 7 Jul 2014 17:40:57 +0200 | Subject | Re: [PATCH] pinctrl: pinctrl-msm.c: Cleaning up if unsigned is less than zero | From | Linus Walleij <> |
| |
On Thu, Jun 26, 2014 at 1:31 PM, Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> wrote:
> Remove checking if a unsigned is less than zero > > This was found using a static code analysis program called cppcheck. > > Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> (...) > - if (WARN_ON(g->mux_bit < 0)) > + if (WARN_ON(g->mux_bit != 0))
Is that correct?
If the variable cannot be < 0 should the check not simply be deleted, since this is all it checks for?
Yours, Linus Walleij
| |