i2c: stm32: simplify status messages in case of errors
Avoid usage of __func__ when reporting an error message since dev_err or dev_dbg is already providing enough details to identify the source of the message. Change-Id: I84898f71890cf690bcd64b0f74524127d501f2c9 Signed-off-by: Alain VOLMAT <alain.volmat@foss.st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/230599 Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com> Reviewed-by: Amelie DELAUNAY <amelie.delaunay@foss.st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/266177 Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
This commit is contained in:
committed by
Eric Fourmont
parent
19f137cbcd
commit
b45cf72667
@ -1594,6 +1594,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;
|
||||
@ -1603,8 +1604,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;
|
||||
@ -1612,21 +1612,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;
|
||||
|
||||
Reference in New Issue
Block a user