From 49dd1d9143c31f60d03fa8b0d4ebfc004b9d861b Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 28 Apr 2018 12:06:59 -0700 Subject: [PATCH] qcacmn: Add missing entry to VERBOSE_STR[] In qdf_trace_msg_cmn() the VERBOSE_STR array is used to convert a trace level into a string. This array is missing an entry for QDF_TRACE_LEVEL_ALL, so add it. Change-Id: Iee6337cda7e54c429d36b2fd42bbd0c143c7d5a5 CRs-Fixed: 2232820 --- qdf/linux/src/qdf_trace.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index a4e7f87c12ae..75ef6e9b68c2 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -2690,17 +2690,17 @@ void qdf_trace_msg_cmn(unsigned int idx, */ if (print_ctrl_obj[idx].cat_info[category].category_verbose_mask & QDF_TRACE_LEVEL_TO_MODULE_BITMASK(verbose)) { - /* - * The verbose strings are in an array. These are ordered in - * the same order as the verbose levels are defined in the enum - * (see QDF_TRACE_LEVEL) so we can index into this array with - * the level and get the right string. The qdf verbose - * are... Off, Fatal, Error, Warning, Info, Info_high, - * Info_med, Info_low, Debug - */ - static const char * const VERBOSE_STR[] = { " ", "F", "E", "W", - "I", "IH", "IM", "IL", - "D" }; + static const char * const VERBOSE_STR[] = { + [QDF_TRACE_LEVEL_NONE] = "", + [QDF_TRACE_LEVEL_FATAL] = "F", + [QDF_TRACE_LEVEL_ERROR] = "E", + [QDF_TRACE_LEVEL_WARN] = "W", + [QDF_TRACE_LEVEL_INFO] = "I", + [QDF_TRACE_LEVEL_INFO_HIGH] = "IH", + [QDF_TRACE_LEVEL_INFO_MED] = "IM", + [QDF_TRACE_LEVEL_INFO_LOW] = "IL", + [QDF_TRACE_LEVEL_DEBUG] = "D", + [QDF_TRACE_LEVEL_ALL] = "" }; /* print the prefix string into the string buffer... */ n = scnprintf(str_buffer, QDF_TRACE_BUFFER_SIZE,