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]
Message-ID: <1a5f4081-191f-49a5-b3a0-419656b04bf4@collabora.com>
Date: Tue, 21 Oct 2025 10:07:02 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: sboyd@...nel.org, jic23@...nel.org, dlechner@...libre.com,
 nuno.sa@...log.com, andy@...nel.org, arnd@...db.de,
 gregkh@...uxfoundation.org, srini@...nel.org, vkoul@...nel.org,
 kishon@...nel.org, sre@...nel.org, krzysztof.kozlowski@...aro.org,
 u.kleine-koenig@...libre.com, linux-arm-msm@...r.kernel.org,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-phy@...ts.infradead.org, linux-pm@...r.kernel.org,
 kernel@...labora.com, wenst@...omium.org, casey.connolly@...aro.org,
 AngeloGioacchino Del Regno <angleogioacchino.delregno@...labora.com>
Subject: Re: [PATCH v6 1/8] spmi: Print error status with %pe format

Il 18/10/25 21:12, Andy Shevchenko ha scritto:
> On Thu, Oct 16, 2025 at 12:43:55PM +0200, AngeloGioacchino Del Regno wrote:
>> Instead of printing just a number, use the %pe format for error
>> status, increasing readability of error prints.
> 
> ...
> 
>>   	err = device_add(&sdev->dev);
>>   	if (err < 0) {
>> -		dev_err(&sdev->dev, "Can't add %s, status %d\n",
>> -			dev_name(&sdev->dev), err);
>> +		dev_err(&sdev->dev, "Can't add %s, status %pe\n",
>> +			dev_name(&sdev->dev), ERR_PTR(err));
> 
> LOL, I only now noticed that the parameter to dev_err() and dev_name() is the
> same. For christ's sake, why do we need dev_name()?
> 

Just only for consistency and having the exact same message as function
spmi_device_add() and nothing else.

I agree that it's not really needed; if you want I can just change the
error message in both spmi_device_add() and in the new function that I
am introducing here.

Cheers,
Angelo

>>   		goto err_device_add;
>>   	}
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ