Re: [PATCH V4 4/5] OMAPDSS: Replace multi part debug prints with pr_debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2012-09-29 at 16:19 +0530, Chandrabhanu Mahapatra wrote:
> 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 <cmahapatra@xxxxxx>
> ---
>  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

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux