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]
Message-id: <4F1FD630.8070606@samsung.com>
Date:	Wed, 25 Jan 2012 11:15:12 +0100
From:	Karol Lewandowski <k.lewandowsk@...sung.com>
To:	Karol Lewandowski <k.lewandowsk@...sung.com>
Cc:	broonie@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org,
	m.szyprowski@...sung.com, s.nawrocki@...sung.com, lrg@...com,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Thomas Abraham <thomas.abraham@...aro.org>
Subject: Re: [PATCH] regulator: Set apply_uV only when min and max voltages are
 defined

On 25.01.2012 10:31, Karol Lewandowski wrote:
> apply_uV is errornously set when regulator is instantiated from device
> tree, even when it doesn't contain any voltage constraints.
...
> -	if (constraints->min_uV == constraints->max_uV)
> +	if (min_uV&&  max_uV&&  constraints->min_uV == constraints->max_uV)
>   		constraints->apply_uV = true;

While this fixes obvious error I doubt that apply_uV should be set based 
on min max equality. It have required fix to fixed regulator[1]
as well for max8997[2].  It'll probably require fixes in other places too.

Wouldn't it be better to explicitly use property like 
"regulator-voltage-apply" in DT to set apply_uV?

   if (min_uV && max_uV && constraints->min_uV == constraints->max_uV
       && of_find_property "regulator-voltage-apply")
          constraints->apply_uV = true;

This would be consistent with handling of this flag from platform data.

[1] http://permalink.gmane.org/gmane.linux.kernel/1234969
[2] http://permalink.gmane.org/gmane.linux.kernel/1243714

Regards,
-- 
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform
--
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