[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1296855888-1535-1-git-send-email-horms@verge.net.au>
Date: Sat, 5 Feb 2011 06:44:48 +0900
From: Simon Horman <horms@...ge.net.au>
To: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Guennadi Liakhovetski <g.liakhovetski@....de>,
Ian Molton <ian@...menth.co.uk>, Chris Ball <cjb@...top.org>,
Simon Horman <horms@...ge.net.au>
Subject: [PATCH] [patch v2] tmio_mmc: Improve readability of the output of pr_debug_status()
Cc: Guennadi Liakhovetski <g.liakhovetski@....de>
Signed-off-by: Simon Horman <horms@...ge.net.au>
---
v2: As suggested by Guennadi Liakhovetski
* Pass status and i as parameters to STATUS_TO_TEXT
* Pad "|" with spaces to further improve readability
---
drivers/mmc/host/tmio_mmc.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 6f724de..811427d 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -237,12 +237,16 @@ static inline void tmio_mmc_kunmap_atomic(void *virt,
#define STATUS_TO_TEXT(a) \
do { \
- if (status & TMIO_STAT_##a) \
+ if (status & TMIO_STAT_##a) { \
+ if (i++) \
+ printk("|"); \
printk(#a); \
+ } \
} while (0)
void pr_debug_status(u32 status)
{
+ int i = 0;
printk(KERN_DEBUG "status: %08x = ", status);
STATUS_TO_TEXT(CARD_REMOVE);
STATUS_TO_TEXT(CARD_INSERT);
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists