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, 25 May 2021 09:25:47 +0200
From:   Jerome Brunet <jbrunet@...libre.com>
To:     Joe Perches <joe@...ches.com>, Mark Brown <broonie@...nel.org>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH] ASoC: meson: use dev_err_probe


On Tue 25 May 2021 at 02:07, Joe Perches <joe@...ches.com> wrote:

> On Mon, 2021-05-24 at 18:51 +0200, Jerome Brunet wrote:
>> Use dev_err_probe() helper function to handle probe deferral.
>> It removes the open coded test for -EPROBE_DEFER but more importantly, it
>> sets the deferral reason in debugfs which is great for debugging.
>
> trivia:
>
> It seems that the use of %ld, PTR_ERR(<foo>) isn't particularly
> useful now as dev_err_probe already uses %pe to emit descriptive
> error messages.

Indeed. I'll update. Thx for pointing this out.

>
>
>> diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
> []
>> @@ -352,17 +352,16 @@ int axg_fifo_probe(struct platform_device *pdev)
>>  
>> 
>>  	fifo->pclk = devm_clk_get(dev, NULL);
>>  	if (IS_ERR(fifo->pclk)) {
>> -		if (PTR_ERR(fifo->pclk) != -EPROBE_DEFER)
>> -			dev_err(dev, "failed to get pclk: %ld\n",
>> -				PTR_ERR(fifo->pclk));
>> +		dev_err_probe(dev, PTR_ERR(fifo->pclk),
>> +			      "failed to get pclk: %ld\n", PTR_ERR(fifo->pclk));
>
> here.
>
>>  		return PTR_ERR(fifo->pclk);
>>  	}
>>  
>> 
>>  	fifo->arb = devm_reset_control_get_exclusive(dev, NULL);
>>  	if (IS_ERR(fifo->arb)) {
>> -		if (PTR_ERR(fifo->arb) != -EPROBE_DEFER)
>> -			dev_err(dev, "failed to get arb reset: %ld\n",
>> -				PTR_ERR(fifo->arb));
>> +		dev_err_probe(dev, PTR_ERR(fifo->arb),
>> +			      "failed to get arb reset: %ld\n",
>> +			      PTR_ERR(fifo->arb));
>
> etc...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ