mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] i2c: designware: fix error message formatting
@ 2021-05-31  7:13 Ahmad Fatoum
  2021-05-31  9:47 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-05-31  7:13 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Some error messages lack a trailing new line. One dev_dbg uses the i2c
adapter's device_d as domain, before it was allocated. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/i2c/busses/i2c-designware.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
index bb9a0b7c4ad4..8508fac7171f 100644
--- a/drivers/i2c/busses/i2c-designware.c
+++ b/drivers/i2c/busses/i2c-designware.c
@@ -274,7 +274,7 @@ static void i2c_dw_setup_timings(struct dw_i2c_dev *dw)
 		if (!(dw->sda_hold_time & DW_IC_SDA_HOLD_RX_MASK))
 			dw->sda_hold_time |= 1 << DW_IC_SDA_HOLD_RX_SHIFT;
 
-		dev_dbg(&dw->adapter.dev, "adjust SDA hold time.\n");
+		dev_dbg(dw->adapter.dev.parent, "adjust SDA hold time.\n");
 		writel(dw->sda_hold_time, dw->base + DW_IC_SDA_HOLD);
 	}
 }
@@ -547,9 +547,7 @@ static int i2c_dw_probe(struct device_d *pdev)
 
 	ic_comp_type_value = readl(dw->base + DW_IC_COMP_TYPE);
 	if (ic_comp_type_value != DW_IC_COMP_TYPE_VALUE) {
-		dev_err(pdev,
-			"unknown DesignWare IP block 0x%08x",
-			ic_comp_type_value);
+		dev_err(pdev, "unknown DesignWare IP block 0x%08x\n", ic_comp_type_value);
 		ret = -ENODEV;
 		goto fail;
 	}
@@ -574,7 +572,7 @@ static int i2c_dw_probe(struct device_d *pdev)
 		ic_con = DW_IC_CON_SPEED_FAST;
 		break;
 	default:
-		dev_warn(pdev, "requested bitrate (%d) is not supported."
+		dev_warn(pdev, "requested bitrate (%d) is not supported.\n"
 			 " Falling back to 100kHz", bitrate);
 	case 100000:		/* FALLTHROUGH */
 		ic_con = DW_IC_CON_SPEED_STD;
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  7:13 [PATCH] i2c: designware: fix error message formatting Ahmad Fatoum
2021-05-31  9:47 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox