6c912e625490d96dea3ab2dc6be3c76290ff279a
[openwrt/openwrt.git] /
1 From: Russell King <rmk+kernel@armlinux.org.uk>
2 Bcc: linux@mail.armlinux.org.uk
3 Cc: linux-i2c@vger.kernel.org
4 Subject: [PATCH 10/17] i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
5 MIME-Version: 1.0
6 Content-Disposition: inline
7 Content-Transfer-Encoding: 8bit
8 Content-Type: text/plain; charset="utf-8"
9
10 The IRQ log output is supposed to appear on a single line. However,
11 commit 3a2dc1677b60 ("i2c: pxa: Update debug function to dump more info
12 on error") resulted in it being printed one-entry-per-line, which is
13 excessively long.
14
15 Fixing this is not a trivial matter; using pr_cont() doesn't work as
16 the previous dev_dbg() may not have been compiled in, or may be
17 dynamic.
18
19 Since the rest of this function output is at error level, and is also
20 debug output, promote this to error level as well to avoid this
21 problem.
22
23 Reduce the number of always zero prefix digits to save screen real-
24 estate.
25
26 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
27 ---
28 drivers/i2c/busses/i2c-pxa.c | 7 +++----
29 1 file changed, 3 insertions(+), 4 deletions(-)
30
31 diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
32 index 760a29fb6af5..f3a11050053c 100644
33 --- a/drivers/i2c/busses/i2c-pxa.c
34 +++ b/drivers/i2c/busses/i2c-pxa.c
35 @@ -364,11 +364,10 @@ static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why)
36 dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n",
37 readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)),
38 readl(_ISR(i2c)));
39 - dev_dbg(dev, "log: ");
40 + dev_err(dev, "log:");
41 for (i = 0; i < i2c->irqlogidx; i++)
42 - pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
43 -
44 - pr_debug("\n");
45 + pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]);
46 + pr_cont("\n");
47 }
48
49 #else /* ifdef DEBUG */
50 --
51 2.20.1
52