mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] i2c: designware: fix error message formatting
Date: Mon, 31 May 2021 09:13:04 +0200	[thread overview]
Message-ID: <20210531071304.32217-1-a.fatoum@pengutronix.de> (raw)

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


             reply	other threads:[~2021-05-31  7:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31  7:13 Ahmad Fatoum [this message]
2021-05-31  9:47 ` Sascha Hauer

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=20210531071304.32217-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH] i2c: designware: fix error message formatting' \
    /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

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