[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260114083957.9945-3-angelogioacchino.delregno@collabora.com>
Date: Wed, 14 Jan 2026 09:39:49 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: jic23@...nel.org
Cc: dlechner@...libre.com,
nuno.sa@...log.com,
andy@...nel.org,
arnd@...db.de,
gregkh@...uxfoundation.org,
srini@...nel.org,
vkoul@...nel.org,
neil.armstrong@...aro.org,
sre@...nel.org,
sboyd@...nel.org,
angelogioacchino.delregno@...labora.com,
krzk@...nel.org,
dmitry.baryshkov@....qualcomm.com,
quic_wcheng@...cinc.com,
melody.olvera@....qualcomm.com,
quic_nsekar@...cinc.com,
ivo.ivanov.ivanov1@...il.com,
abelvesa@...nel.org,
luca.weiss@...rphone.com,
konrad.dybcio@....qualcomm.com,
mitltlatltl@...il.com,
krishna.kurapati@....qualcomm.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
Subject: [PATCH v7 02/10] spmi: Remove redundant dev_name() print in spmi_device_add()
Function spmi_device_add() uses dev_{dbg,err}() for respectively
debug and error prints, and passes the same device pointer as both
the dev_{dbg,err}() parameters and to a dev_name() that is part of
the actual message.
This means that the device name gets printed twice!
Remove the redundant dev_name() from the messages.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
---
drivers/spmi/spmi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index bcb71f25194f..c21789c6b59f 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -68,12 +68,11 @@ int spmi_device_add(struct spmi_device *sdev)
err = device_add(&sdev->dev);
if (err < 0) {
- dev_err(&sdev->dev, "Can't add %s, status %pe\n",
- dev_name(&sdev->dev), ERR_PTR(err));
+ dev_err(&sdev->dev, "Can't add device, status %pe\n", ERR_PTR(err));
goto err_device_add;
}
- dev_dbg(&sdev->dev, "device %s registered\n", dev_name(&sdev->dev));
+ dev_dbg(&sdev->dev, "device registered\n");
err_device_add:
return err;
--
2.52.0
Powered by blists - more mailing lists