From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Alain Volmat <alain.volmat@foss.st.com>,
Andi Shyti <andi.shyti@kernel.org>, Wolfram Sang <wsa@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y v2 4/5] i2c: stm32f7: simplify status messages in case of errors
Date: Wed, 30 Jul 2025 10:00:01 -0400 [thread overview]
Message-ID: <20250730140002.3814528-4-sashal@kernel.org> (raw)
In-Reply-To: <20250730140002.3814528-1-sashal@kernel.org>
From: Alain Volmat <alain.volmat@foss.st.com>
[ Upstream commit 33a00d919253022aabafecae6bc88a6fad446589 ]
Avoid usage of __func__ when reporting an error message
since dev_err/dev_dbg are already providing enough details
to identify the source of the message.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: 6aae87fe7f18 ("i2c: stm32f7: unmap DMA mapped buffer")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i2c/busses/i2c-stm32f7.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 74fef11fd18a..cc76c71666e5 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1601,6 +1601,7 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data)
{
struct stm32f7_i2c_dev *i2c_dev = data;
struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg;
+ u16 addr = f7_msg->addr;
void __iomem *base = i2c_dev->base;
struct device *dev = i2c_dev->dev;
struct stm32_i2c_dma *dma = i2c_dev->dma;
@@ -1610,8 +1611,7 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data)
/* Bus error */
if (status & STM32F7_I2C_ISR_BERR) {
- dev_err(dev, "<%s>: Bus error accessing addr 0x%x\n",
- __func__, f7_msg->addr);
+ dev_err(dev, "Bus error accessing addr 0x%x\n", addr);
writel_relaxed(STM32F7_I2C_ICR_BERRCF, base + STM32F7_I2C_ICR);
stm32f7_i2c_release_bus(&i2c_dev->adap);
f7_msg->result = -EIO;
@@ -1619,21 +1619,19 @@ static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data)
/* Arbitration loss */
if (status & STM32F7_I2C_ISR_ARLO) {
- dev_dbg(dev, "<%s>: Arbitration loss accessing addr 0x%x\n",
- __func__, f7_msg->addr);
+ dev_dbg(dev, "Arbitration loss accessing addr 0x%x\n", addr);
writel_relaxed(STM32F7_I2C_ICR_ARLOCF, base + STM32F7_I2C_ICR);
f7_msg->result = -EAGAIN;
}
if (status & STM32F7_I2C_ISR_PECERR) {
- dev_err(dev, "<%s>: PEC error in reception accessing addr 0x%x\n",
- __func__, f7_msg->addr);
+ dev_err(dev, "PEC error in reception accessing addr 0x%x\n", addr);
writel_relaxed(STM32F7_I2C_ICR_PECCF, base + STM32F7_I2C_ICR);
f7_msg->result = -EINVAL;
}
if (status & STM32F7_I2C_ISR_ALERT) {
- dev_dbg(dev, "<%s>: SMBus alert received\n", __func__);
+ dev_dbg(dev, "SMBus alert received\n");
writel_relaxed(STM32F7_I2C_ICR_ALERTCF, base + STM32F7_I2C_ICR);
i2c_handle_smbus_alert(i2c_dev->alert->ara);
return IRQ_HANDLED;
--
2.39.5
next prev parent reply other threads:[~2025-07-30 14:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 9:24 FAILED: patch "[PATCH] i2c: stm32f7: unmap DMA mapped buffer" failed to apply to 6.6-stable tree gregkh
2025-07-23 0:19 ` [PATCH 6.6.y 1/6] i2c: stm32f7: Use devm_clk_get_enabled() Sasha Levin
2025-07-23 0:19 ` [PATCH 6.6.y 2/6] i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq Sasha Levin
2025-07-23 0:19 ` [PATCH 6.6.y 3/6] i2c: stm32f7: perform most of irq job in threaded handler Sasha Levin
2025-07-23 0:19 ` [PATCH 6.6.y 4/6] i2c: stm32f7: simplify status messages in case of errors Sasha Levin
2025-07-23 0:19 ` [PATCH 6.6.y 5/6] i2c: stm32: fix the device used for the DMA map Sasha Levin
2025-07-30 9:03 ` Greg KH
2025-07-30 13:50 ` Sasha Levin
2025-07-23 0:19 ` [PATCH 6.6.y 6/6] i2c: stm32f7: unmap DMA mapped buffer Sasha Levin
2025-07-30 13:59 ` [PATCH 6.6.y v2 1/5] i2c: stm32f7: Use devm_clk_get_enabled() Sasha Levin
2025-07-30 13:59 ` [PATCH 6.6.y v2 2/5] i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq Sasha Levin
2025-07-30 14:00 ` [PATCH 6.6.y v2 3/5] i2c: stm32f7: perform most of irq job in threaded handler Sasha Levin
2025-07-30 14:00 ` Sasha Levin [this message]
2025-07-30 14:00 ` [PATCH 6.6.y v2 5/5] i2c: stm32f7: unmap DMA mapped buffer Sasha Levin
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=20250730140002.3814528-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alain.volmat@foss.st.com \
--cc=andi.shyti@kernel.org \
--cc=stable@vger.kernel.org \
--cc=wsa@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.