* [PATCH v2 8/10] i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function
@ 2025-05-11 20:39 Enrico Zanda
2025-05-12 21:37 ` Andi Shyti
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Zanda @ 2025-05-11 20:39 UTC (permalink / raw)
To: linux-i2c; +Cc: andi.shyti, Enrico Zanda
This simplifies the code while improving log.
Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
---
Changes in v2: Rebase to https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
branch i2c/i2c-host.
---
drivers/i2c/busses/i2c-xgene-slimpro.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-xgene-slimpro.c b/drivers/i2c/busses/i2c-xgene-slimpro.c
index a0880f4a056d..b29dec66b2c3 100644
--- a/drivers/i2c/busses/i2c-xgene-slimpro.c
+++ b/drivers/i2c/busses/i2c-xgene-slimpro.c
@@ -457,10 +457,9 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
cl->tx_block = true;
cl->rx_callback = slimpro_i2c_rx_cb;
ctx->mbox_chan = mbox_request_channel(cl, MAILBOX_I2C_INDEX);
- if (IS_ERR(ctx->mbox_chan)) {
- dev_err(&pdev->dev, "i2c mailbox channel request failed\n");
- return PTR_ERR(ctx->mbox_chan);
- }
+ if (IS_ERR(ctx->mbox_chan))
+ return dev_err_probe(&pdev->dev, PTR_ERR(ctx->mbox_chan),
+ "i2c mailbox channel request failed\n");
} else {
struct pcc_mbox_chan *pcc_chan;
const struct acpi_device_id *acpi_id;
@@ -477,17 +476,16 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
cl->tx_block = false;
cl->rx_callback = slimpro_i2c_pcc_rx_cb;
pcc_chan = pcc_mbox_request_channel(cl, ctx->mbox_idx);
- if (IS_ERR(pcc_chan)) {
- dev_err(&pdev->dev, "PCC mailbox channel request failed\n");
- return PTR_ERR(pcc_chan);
- }
+ if (IS_ERR(pcc_chan))
+ return dev_err_probe(&pdev->dev, PTR_ERR(pcc_chan),
+ "PCC mailbox channel request failed\n");
ctx->pcc_chan = pcc_chan;
ctx->mbox_chan = pcc_chan->mchan;
if (!ctx->mbox_chan->mbox->txdone_irq) {
- dev_err(&pdev->dev, "PCC IRQ not supported\n");
- rc = -ENOENT;
+ rc = dev_err_probe(&pdev->dev, -ENOENT,
+ "PCC IRQ not supported\n");
goto mbox_err;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2 8/10] i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function
2025-05-11 20:39 [PATCH v2 8/10] i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function Enrico Zanda
@ 2025-05-12 21:37 ` Andi Shyti
0 siblings, 0 replies; 2+ messages in thread
From: Andi Shyti @ 2025-05-12 21:37 UTC (permalink / raw)
To: Enrico Zanda; +Cc: linux-i2c
Hi Enrico,
On Sun, May 11, 2025 at 10:39:21PM +0200, Enrico Zanda wrote:
> This simplifies the code while improving log.
>
> Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
> ---
> Changes in v2: Rebase to https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
> branch i2c/i2c-host.
from your original series, I asked you to resend both patch 4 and
patch 8. Please check my comments on viai2c-wmt.
In any case, I am taking this one.
Next time, when you send a single patch like this, considering
that I already took 8 out of your 10, you do not need to keep the
original numbering (e.g. 8/10), as it is now a standalone patch.
Thanks,
Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-12 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-11 20:39 [PATCH v2 8/10] i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function Enrico Zanda
2025-05-12 21:37 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox