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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 03 Feb 2015 17:53:48 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Mark Brown <broonie@...nel.org>,
	Manuel Lauss <manuel.lauss@...il.com>
CC:	alsa-devel <alsa-devel@...a-project.org>,
	Richard Purdie <richard@...nedhand.com>,
	patches@...nsource.wolfsonmicro.com,
	LKML <linux-kernel@...r.kernel.org>, linux-sound@...r.kernel.org,
	Manuel Lauss <manuel.lauss@...glemail.com>,
	Bo Shen <voice.shen@...el.com>,
	linux-arm-kernel@...ts.infradead.org,
	Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: [alsa-devel] [RFC PATCH] ASoC: wm8731: let codec to manage clock
 by itself

On 02/03/2015 01:44 PM, Mark Brown wrote:
> On Tue, Feb 03, 2015 at 08:54:57AM +0100, Manuel Lauss wrote:
>
>> +    wm8731->mclk = devm_clk_get(&spi->dev, "mclk");
>> +    if (IS_ERR(wm8731->mclk)) {
>> +        wm8731->mclk = NULL;
>> +        dev_warn(&spi->dev, "assuming static MCLK\n");
>> +    }
>
> This is broken for both deferred probe and in the case where the clock
> API genuinely returns a NULL clock.  Other than that it's the kind of
> thing that we've done for some other drivers, though it's not good to
> have to do this.  Check them for correct behaviour.

Ideally we'd introduce a {devm_}clk_get_optional(), with the same semantics 
as gpiod_get_optional(), which handles the finer details of differentiating 
between clock specified, but not yet probed, clock specified, but 
incorrectly and no clock specified, so this doesn't have to be done over and 
over by each driver.

--
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