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:	Tue, 3 Jul 2012 23:44:34 -0400
From:	"Zhang, Sonic" <Sonic.Zhang@...log.com>
To:	Axel Lin <axel.lin@...il.com>
CC:	Lars-Peter Clausen <lars@...afoo.de>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Liam Girdwood <lrg@...com>
Subject: RE: [PATCH v2] regulator: ad5398: Fix min/max current limit
 boundary checking



>-----Original Message-----
>From: Axel Lin [mailto:axel.lin@...il.com]
>Sent: Wednesday, July 04, 2012 11:19 AM
>To: Zhang, Sonic
>Cc: Lars-Peter Clausen; Mark Brown; linux-kernel@...r.kernel.org; Liam
>Girdwood
>Subject: RE: [PATCH v2] regulator: ad5398: Fix min/max current limit boundary
>checking
>
>
>> >That is why we need to add:
>> >if (min_uA < chip->min_uA)
>> >        min_uA = chip->min_uA;
>> >
>>
>> Yes, but if you apply this logic to min_uA, you should apply the same logic to
>max_uA, even though it is not used in your application.
>
>Actually, the logic is the same:
>to find a supported (minmal) current in specified range.
>
>The question is the equation used in current code does not allow
>min_uA < chip->min_uA.
>Setting min_uA = chip->min_uA if min_uA < chip->min_uA does make sense
>because botch request actually returns the same current value.
>( I mean no user visible change )
>
>Adding below logic is not necessary.
>( Note: Adding this or not does not have any user visible change, it's
>just not necessary)
>
>if (max_uA > chip->min_uA)
>        max_uA = chip->max_uA;
>
>It is not necessary because the equation to choose selector does not
>depends on max_uA. No matter if we set max_uA = chip->max_uA or not in
>this case, it does not impact the equation to choose the selector.
>
>But, well, if you really prefer adding it. I'll send a v3 for it.
>Just let me know how do you think.

Yes, v3 please.

Sonic

>
>Regards,
>Axel
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ