diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-04-27 21:49:27 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-05-05 15:51:01 +0300 |
commit | bb82ba690757fb483b5848d3e2f577a102e8a9c8 (patch) | |
tree | 79bbc562c821a61d7107abc67a940fe2e21c54ea | |
parent | 88b73ee7ca4c90baf136ed5a8377fc5a9b73ac08 (diff) | |
download | linux-bb82ba690757fb483b5848d3e2f577a102e8a9c8.tar.xz |
i2c: pxa: clean up decode_bits()
Clean up decode_bits() to use pr_cont(), and move the newline into the
function rather than at its two callsites. Avoid printing an
unnecessary space before the newline.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 41047abe67bf..7aa35def464b 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -286,13 +286,14 @@ struct bits { static inline void decode_bits(const char *prefix, const struct bits *bits, int num, u32 val) { - printk("%s %08x: ", prefix, val); + printk("%s %08x:", prefix, val); while (num--) { const char *str = val & bits->mask ? bits->set : bits->unset; if (str) - printk("%s ", str); + pr_cont(" %s", str); bits++; } + pr_cont("\n"); } static const struct bits isr_bits[] = { @@ -312,7 +313,6 @@ static const struct bits isr_bits[] = { static void decode_ISR(unsigned int val) { decode_bits(KERN_DEBUG "ISR", isr_bits, ARRAY_SIZE(isr_bits), val); - printk("\n"); } static const struct bits icr_bits[] = { @@ -337,7 +337,6 @@ static const struct bits icr_bits[] = { static void decode_ICR(unsigned int val) { decode_bits(KERN_DEBUG "ICR", icr_bits, ARRAY_SIZE(icr_bits), val); - printk("\n"); } #endif |