From c90e1dc372dfd30a6e8bb68e0635547c2812b24a Mon Sep 17 00:00:00 2001 From: phadiman Date: Fri, 26 Jun 2020 01:53:17 +0530 Subject: [PATCH] qcacmn: Fix incorrect verbose level debug print If QDF_TRACE is called with wrong verbose level then the actual print is supressed and a error log will be printed indicating wrong verbose level This change is introduced because of an issue wherein the prints flooded with wrong verbose level and could not identify the incorrect caller Add change to concatenate the actual print along with failure message to help identify such incorrect callers CRs-Fixed: 2716564 Change-Id: I19c4e80958c1ab5d621eea3a6d32308ce4c51558 --- qdf/linux/src/qdf_trace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index d68bc8bb86f4..27c942c012a6 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -3274,13 +3274,17 @@ void qdf_trace_msg_cmn(unsigned int idx, /* Check if category passed is valid */ if (category < 0 || category >= MAX_SUPPORTED_CATEGORY) { - pr_info("%s: Invalid category: %d\n", __func__, category); + vscnprintf(str_buffer, QDF_TRACE_BUFFER_SIZE, str_format, val); + pr_info("%s: Invalid category: %d, log: %s\n", + __func__, category, str_buffer); return; } /* Check if verbose mask is valid */ if (verbose < 0 || verbose >= QDF_TRACE_LEVEL_MAX) { - pr_info("%s: Invalid verbose level %d\n", __func__, verbose); + vscnprintf(str_buffer, QDF_TRACE_BUFFER_SIZE, str_format, val); + pr_info("%s: Invalid verbose level %d, log: %s\n", + __func__, verbose, str_buffer); return; }