lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 7 Jul 2014 20:44:41 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: pinctrl-msm.c: Cleaning up if unsigned is less
 than zero

2014-07-07 17:40 GMT+02:00 Linus Walleij <linus.walleij@...aro.org>:
> On Thu, Jun 26, 2014 at 1:31 PM, Rickard Strandqvist
> <rickard_strandqvist@...ctrumdigital.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@...ctrumdigital.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?


Hi Linus!

Yes, it was a bit silly. Do not really know how that happened :-/

I guess I thought it was reasonable. But I should do as I have tried
to do in all other cases, the smallest possible change. And let you
check in code, if so, to capture what is missing.

New patch on the way!


Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ