0afb29472bcb15fc204b214904a6033c579b1380
[openwrt/staging/linusw.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 --- a/drivers/i2c/busses/i2c-pxa.c
32 +++ b/drivers/i2c/busses/i2c-pxa.c
33 @@ -364,11 +364,10 @@ static void i2c_pxa_scream_blue_murder(s
34 dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n",
35 readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)),
36 readl(_ISR(i2c)));
37 - dev_dbg(dev, "log: ");
38 + dev_err(dev, "log:");
39 for (i = 0; i < i2c->irqlogidx; i++)
40 - pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);
41 -
42 - pr_debug("\n");
43 + pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]);
44 + pr_cont("\n");
45 }
46
47 #else /* ifdef DEBUG */