Skip to content

Commit

Permalink
i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
Browse files Browse the repository at this point in the history
[ Upstream commit 88b73ee ]

The IRQ log output is supposed to appear on a single line.  However,
commit 3a2dc16 ("i2c: pxa: Update debug function to dump more info
on error") resulted in it being printed one-entry-per-line, which is
excessively long.

Fixing this is not a trivial matter; using pr_cont() doesn't work as
the previous dev_dbg() may not have been compiled in, or may be
dynamic.

Since the rest of this function output is at error level, and is also
debug output, promote this to error level as well to avoid this
problem.

Reduce the number of always zero prefix digits to save screen real-
estate.

Signed-off-by: Russell King <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Russell King authored and gregkh committed Jun 24, 2020
1 parent ce6a727 commit 9a206a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,10 @@ static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why)
dev_err(dev, "IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n",
readl(_IBMR(i2c)), readl(_IDBR(i2c)), readl(_ICR(i2c)),
readl(_ISR(i2c)));
dev_dbg(dev, "log: ");
dev_err(dev, "log:");
for (i = 0; i < i2c->irqlogidx; i++)
pr_debug("[%08x:%08x] ", i2c->isrlog[i], i2c->icrlog[i]);

pr_debug("\n");
pr_cont(" [%03x:%05x]", i2c->isrlog[i], i2c->icrlog[i]);
pr_cont("\n");
}

#else /* ifdef DEBUG */
Expand Down

0 comments on commit 9a206a5

Please sign in to comment.