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: <97c0a0f7-ea4d-452b-956b-27de23cbc11b@vivo.com>
Date: Tue, 19 Aug 2025 10:57:44 +0000
From: 赵西超 <zhao.xichao@...o.com>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>
CC: "thierry.reding@...il.com" <thierry.reding@...il.com>,
	"jonathanh@...dia.com" <jonathanh@...dia.com>, "skomatineni@...dia.com"
	<skomatineni@...dia.com>, "mchehab@...nel.org" <mchehab@...nel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: media: tegra-video: Remove the use of
 dev_err_probe()

在 2025/8/19 18:28, Luca Ceresoli 写道:
> Hello Xichao, Uwe,
>
> +Uwe, author of 2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent
> for -ENOMEM").
>
> On Tue, 19 Aug 2025 17:23:30 +0800
> Xichao Zhao <zhao.xichao@...o.com> wrote:
>
>> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
>> remove the useless call to dev_err_probe(), and just return the value instead.
>>
>> Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
>> ---
>>   drivers/staging/media/tegra-video/tegra20.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/tegra-video/tegra20.c b/drivers/staging/media/tegra-video/tegra20.c
>> index 7b8f8f810b35..ee65e89c119c 100644
>> --- a/drivers/staging/media/tegra-video/tegra20.c
>> +++ b/drivers/staging/media/tegra-video/tegra20.c
>> @@ -255,7 +255,7 @@ static int tegra20_channel_host1x_syncpt_init(struct tegra_vi_channel *chan)
>>   
>>   	out_sp = host1x_syncpt_request(&vi->client, HOST1X_SYNCPT_CLIENT_MANAGED);
>>   	if (!out_sp)
>> -		return dev_err_probe(vi->dev, -ENOMEM, "failed to request syncpoint\n");
>> +		return -ENOMEM;
> Thanks for your patch!
>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
>
> About dev_err_probe(), I wonder whether it should mention the -ENOMEM
> exception in kerneldoc. Is it part of the API "contract" it provides?
>
> It would be good to clarify that, because there are other users of
> dev_err_probe(..., -ENOMEM, ...). I counted 80 with a trivial git grep.
>
> Luca
>
Yes, I agree with your point that the -ENOMEM exception should be 
mentioned in the kerneldoc.

This can help other developers. I am currently cleaning up other code 
that uses dev_err_probe(..., -ENOMEM, ...).

Best regards,

Xichao Zhao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ