msm: vidc: Remove trace_printk non-debug build
trace_printk will cause trace_printk_init_buffers executed in kernel
start, which will increase memory and also show bad warnings in
production kernel.
Test: see warning message gone in dmesg
Bug: 72894705
Change-Id: I207ec504f577511802b9a01df63eef54597499b8
Signed-off-by: Wei Wang <wvw@google.com>
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_debug.h b/drivers/media/platform/msm/vidc/msm_vidc_debug.h
index dbebe5d..50bef1c 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_debug.h
+++ b/drivers/media/platform/msm/vidc/msm_vidc_debug.h
@@ -96,6 +96,12 @@ extern bool msm_vidc_syscache_disable;
__str; \
})
+#if defined(CONFIG_TRACING) && defined(DEBUG)
+#define msm_trace_printk(...) trace_printk(__VA_ARGS__)
+#else
+#define msm_trace_printk(...)
+#endif
+
#define dprintk(__level, __fmt, arg...) \
do { \
if (msm_vidc_debug & __level) { \
@@ -104,7 +110,7 @@ extern bool msm_vidc_syscache_disable;
VIDC_MSG_PRIO2STRING(__level), \
## arg); \
} else if (msm_vidc_debug_out == VIDC_OUT_FTRACE) { \
- trace_printk(KERN_DEBUG VIDC_DBG_TAG __fmt, \
+ msm_trace_printk(KERN_DEBUG VIDC_DBG_TAG __fmt, \
VIDC_MSG_PRIO2STRING(__level), \
## arg); \
} \