Re: [PATCH V4 4/5] OMAPDSS: Replace multi part debug prints with pr_debug
From: Tomi Valkeinen <hidden>
Date: 2012-10-05 12:33:53
Also in:
linux-omap
On Sat, 2012-09-29 at 16:19 +0530, Chandrabhanu Mahapatra wrote:
quoted hunk ↗ jump to hunk
The omap_dispc_unregister_isr() and _dsi_print_reset_status() consist of a number of debug prints which need to be enabled all at once or none at all. So, these debug prints in corresponding functions are replaced with one dynamic debug enabled pr_debug() each. Signed-off-by: Chandrabhanu Mahapatra <redacted> --- drivers/video/omap2/dss/dispc.c | 32 +++++++++++++------------------- drivers/video/omap2/dss/dsi.c | 30 ++++++++++++++---------------- 2 files changed, 27 insertions(+), 35 deletions(-)diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index a173a94..67d9f3b 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c@@ -3675,26 +3675,20 @@ static void print_irq_status(u32 status) if ((status & dispc.irq_error_mask) == 0) return; - printk(KERN_DEBUG "DISPC IRQ: 0x%x: ", status); - -#define PIS(x) \ - if (status & DISPC_IRQ_##x) \ - printk(#x " "); - PIS(GFX_FIFO_UNDERFLOW); - PIS(OCP_ERR); - PIS(VID1_FIFO_UNDERFLOW); - PIS(VID2_FIFO_UNDERFLOW); - if (dss_feat_get_num_ovls() > 3) - PIS(VID3_FIFO_UNDERFLOW); - PIS(SYNC_LOST); - PIS(SYNC_LOST_DIGIT); - if (dss_has_feature(FEAT_MGR_LCD2)) - PIS(SYNC_LOST2); - if (dss_has_feature(FEAT_MGR_LCD3)) - PIS(SYNC_LOST3); +#define PIS(x) (status & DISPC_IRQ_##x) ? (#x " ") : "" + + pr_debug("DISPC IRQ: 0x%x: %s%s%s%s%s%s%s%s%s\n", + status, + PIS(OCP_ERR), + PIS(GFX_FIFO_UNDERFLOW), + PIS(VID1_FIFO_UNDERFLOW), + PIS(VID2_FIFO_UNDERFLOW), + dss_feat_get_num_ovls() > 3 ? PIS(VID3_FIFO_UNDERFLOW) : "", + PIS(SYNC_LOST), + PIS(SYNC_LOST_DIGIT), + dss_has_feature(FEAT_MGR_LCD2) ? PIS(SYNC_LOST2) : "", + dss_has_feature(FEAT_MGR_LCD3) ? PIS(SYNC_LOST3) : ""); #undef PIS - - printk("\n"); } #endif
There's similar irq printing code in dsi.c that should also be converted to the above style. Tomi
Attachments
- signature.asc [application/pgp-signature] 836 bytes