Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: sboyd@kernel.org, jic23@kernel.org, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, arnd@arndb.de,
	gregkh@linuxfoundation.org, srini@kernel.org, vkoul@kernel.org,
	kishon@kernel.org, sre@kernel.org,
	krzysztof.kozlowski@linaro.org, u.kleine-koenig@baylibre.com,
	linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-pm@vger.kernel.org, kernel@collabora.com,
	wenst@chromium.org, casey.connolly@linaro.org,
	AngeloGioacchino Del Regno
	<angleogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v6 1/8] spmi: Print error status with %pe format
Date: Tue, 21 Oct 2025 10:07:02 +0200	[thread overview]
Message-ID: <1a5f4081-191f-49a5-b3a0-419656b04bf4@collabora.com> (raw)
In-Reply-To: <aPPmsBHnmKQ1sa3O@ashevche-desk.local>

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


  reply	other threads:[~2025-10-21  8:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 10:43 [PATCH v6 0/8] SPMI: Implement sub-devices and migrate drivers AngeloGioacchino Del Regno
2025-10-16 10:43 ` [PATCH v6 1/8] spmi: Print error status with %pe format AngeloGioacchino Del Regno
2025-10-18 19:12   ` Andy Shevchenko
2025-10-21  8:07     ` AngeloGioacchino Del Regno [this message]
2025-10-16 10:43 ` [PATCH v6 2/8] spmi: Implement spmi_subdevice_alloc_and_add() and devm variant AngeloGioacchino Del Regno
2025-10-16 10:43 ` [PATCH v6 3/8] nvmem: qcom-spmi-sdam: Migrate to devm_spmi_subdevice_alloc_and_add() AngeloGioacchino Del Regno
2025-10-16 10:43 ` [PATCH v6 4/8] power: reset: qcom-pon: " AngeloGioacchino Del Regno
2025-10-16 10:43 ` [PATCH v6 5/8] phy: qualcomm: eusb2-repeater: " AngeloGioacchino Del Regno
2025-10-16 10:44 ` [PATCH v6 6/8] misc: qcom-coincell: " AngeloGioacchino Del Regno
2025-10-16 10:44 ` [PATCH v6 7/8] iio: adc: qcom-spmi-iadc: " AngeloGioacchino Del Regno
2025-10-16 10:44 ` [PATCH v6 8/8] iio: adc: qcom-spmi-iadc: Remove regmap R/W wrapper functions AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a5f4081-191f-49a5-b3a0-419656b04bf4@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=angleogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=casey.connolly@linaro.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=kernel@collabora.com \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=sboyd@kernel.org \
    --cc=sre@kernel.org \
    --cc=srini@kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=vkoul@kernel.org \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox