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 11/17] i2c: pxa: clean up decode_bits()
6 Content-Disposition: inline
7 Content-Transfer-Encoding: 8bit
8 Content-Type: text/plain; charset="utf-8"
10 Clean up decode_bits() to use pr_cont(), and move the newline into the
11 function rather than at its two callsites. Avoid printing an
12 unnecessary space before the newline.
14 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
16 drivers/i2c/busses/i2c-pxa.c | 7 +++----
17 1 file changed, 3 insertions(+), 4 deletions(-)
19 --- a/drivers/i2c/busses/i2c-pxa.c
20 +++ b/drivers/i2c/busses/i2c-pxa.c
21 @@ -287,13 +287,14 @@ struct bits {
23 decode_bits(const char *prefix, const struct bits *bits, int num, u32 val)
25 - printk("%s %08x: ", prefix, val);
26 + printk("%s %08x:", prefix, val);
28 const char *str = val & bits->mask ? bits->set : bits->unset;
31 + pr_cont(" %s", str);
37 static const struct bits isr_bits[] = {
38 @@ -313,7 +314,6 @@ static const struct bits isr_bits[] = {
39 static void decode_ISR(unsigned int val)
41 decode_bits(KERN_DEBUG "ISR", isr_bits, ARRAY_SIZE(isr_bits), val);
45 static const struct bits icr_bits[] = {
46 @@ -338,7 +338,6 @@ static const struct bits icr_bits[] = {
47 static void decode_ICR(unsigned int val)
49 decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val);