diff mbox

[1/3] drm: fix print format of sequence in trace point

Message ID 1372673193-18824-2-git-send-email-sw0312.kim@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Seung-Woo Kim July 1, 2013, 10:06 a.m. UTC
seq of a trace point is unsigned int but print format was %d. So
it fixes the format as %u even the format can be not used.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/drm_trace.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Chris Wilson July 1, 2013, 10:23 a.m. UTC | #1
On Mon, Jul 01, 2013 at 07:06:31PM +0900, Seung-Woo Kim wrote:
> seq of a trace point is unsigned int but print format was %d. So
> it fixes the format as %u even the format can be not used.

I don't understand what you mean here. The patch itself looks fine.
 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Seung-Woo Kim July 1, 2013, 10:28 a.m. UTC | #2
Hello Chris,

Thank you for reviewing.

On 2013? 07? 01? 19:23, Chris Wilson wrote:
> On Mon, Jul 01, 2013 at 07:06:31PM +0900, Seung-Woo Kim wrote:
>> seq of a trace point is unsigned int but print format was %d. So
>> it fixes the format as %u even the format can be not used.
> 
> I don't understand what you mean here. The patch itself looks fine.

I can not find where the format is used or not, so I think the format is
not really used anywhere. If you want to fix the commit-msg, I'll update
and re-send this patch.

Regards,
- Seung-Woo Kim

>  
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
>
Chris Wilson July 1, 2013, 10:34 a.m. UTC | #3
On Mon, Jul 01, 2013 at 07:28:49PM +0900, Seung-Woo Kim wrote:
> Hello Chris,
> 
> Thank you for reviewing.
> 
> On 2013? 07? 01? 19:23, Chris Wilson wrote:
> > On Mon, Jul 01, 2013 at 07:06:31PM +0900, Seung-Woo Kim wrote:
> >> seq of a trace point is unsigned int but print format was %d. So
> >> it fixes the format as %u even the format can be not used.
> > 
> > I don't understand what you mean here. The patch itself looks fine.
> 
> I can not find where the format is used or not, so I think the format is
> not really used anywhere. If you want to fix the commit-msg, I'll update
> and re-send this patch.

One of the tricks performed by the TRACE() macro is that it prepends
"trace_" to the name of the tracepoint for use in the code.

git grep trace_drm_vblank_event:
drivers/gpu/drm/drm_irq.c:	trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
drivers/gpu/drm/drm_irq.c:	trace_drm_vblank_event_queued(current->pid, pipe,
drivers/gpu/drm/drm_irq.c:	trace_drm_vblank_event(crtc, seq);
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h
index 03ea964..27cc95f 100644
--- a/drivers/gpu/drm/drm_trace.h
+++ b/drivers/gpu/drm/drm_trace.h
@@ -21,7 +21,7 @@  TRACE_EVENT(drm_vblank_event,
 		    __entry->crtc = crtc;
 		    __entry->seq = seq;
 		    ),
-	    TP_printk("crtc=%d, seq=%d", __entry->crtc, __entry->seq)
+	    TP_printk("crtc=%d, seq=%u", __entry->crtc, __entry->seq)
 );
 
 TRACE_EVENT(drm_vblank_event_queued,
@@ -37,7 +37,7 @@  TRACE_EVENT(drm_vblank_event_queued,
 		    __entry->crtc = crtc;
 		    __entry->seq = seq;
 		    ),
-	    TP_printk("pid=%d, crtc=%d, seq=%d", __entry->pid, __entry->crtc, \
+	    TP_printk("pid=%d, crtc=%d, seq=%u", __entry->pid, __entry->crtc, \
 		      __entry->seq)
 );
 
@@ -54,7 +54,7 @@  TRACE_EVENT(drm_vblank_event_delivered,
 		    __entry->crtc = crtc;
 		    __entry->seq = seq;
 		    ),
-	    TP_printk("pid=%d, crtc=%d, seq=%d", __entry->pid, __entry->crtc, \
+	    TP_printk("pid=%d, crtc=%d, seq=%u", __entry->pid, __entry->crtc, \
 		      __entry->seq)
 );