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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Aug 2019 09:53:05 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>, <pavel@....cz>
CC:     <linux-leds@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] leds: ti-lmu-common: Fix coccinelle issue in TI LMU

Jacek

On 8/24/19 10:18 AM, Jacek Anaszewski wrote:
> Hi Dan,
>
> Thank you for the patch.
>
> On 8/23/19 9:55 PM, Dan Murphy wrote:
>> Fix the coccinelle issues found in the TI LMU common code
>>
>> drivers/leds/leds-ti-lmu-common.c:97:20-29: WARNING: Unsigned expression compared with zero: ramp_down < 0
>> drivers/leds/leds-ti-lmu-common.c:97:5-12: WARNING: Unsigned expression compared with zero: ramp_up < 0
> Wouldn't it make more sense to remove those pointless checks?
> Clearly a correct index of an array cannot be negative.
> Looking at the code I would make more int -> unsigned int conversions:
>
> - ramp_table should be unsigned int
> - ti_lmu_common_convert_ramp_to_index should return unsigned int
>
Yeah I was going to just remove the code but when I was writing the 
original code my intent was

to extend the ramp call to allow other TI LMU driver to pass in the 
device specific ramp table.

But since I don't currently have any devices on my plate that require 
that I can just remove the code as well

Dan

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ