gfx: pvr: optimize clearing sync counter trace info struct
authorImre Deak <imre.deak@intel.com>
Wed, 11 Jan 2012 14:07:49 +0000 (16:07 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:34 +0000 (12:29 +0300)
Clearing this struct is necessary to suppress tracing for a given sync
counter. But for this we don't need to bzero the whole sync counter info
struct it's enough to set the address to zero.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Tested-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/pvr/pvr_trace_cmd.h

index 5a92255..89eb960 100644 (file)
@@ -110,7 +110,7 @@ static inline void pvr_trcmd_set_data(unsigned long *a, unsigned long val)
 
 static inline void pvr_trcmd_clear_syn(struct pvr_trcmd_syn *ts)
 {
-       memset(ts, 0, sizeof(*ts));
+       ts->addr = 0;
 }
 
 void pvr_trcmd_check_syn_completions(int type);