diff options
| author | Jeff Johnson <jjohnson@qca.qualcomm.com> | 2014-01-08 18:56:13 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2014-02-05 21:06:45 -0800 |
| commit | dd0749023bcfbb244729940b902babb559abaa6c (patch) | |
| tree | cbcdaa2ac13e037d4aff036d3a43abc128554a29 | |
| parent | 190d5090a69371d16308378bd10ecaf594c300cc (diff) | |
qcacld: wma: Fix logging format/argument mismatches
Source code analysis uncovered mismatches between format and argument
in invocations of logging APIs in the wma code, so fix them.
Change-Id: I0e67496f8d52d890cac5f7b88dcd0d47e806d24b
CRs-fixed: 570511
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index cd0b16261e65..40c9dbb38f74 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -489,7 +489,8 @@ static void wma_vdev_start_rsp(tp_wma_handle wma, bcn = wma->interfaces[resp_event->vdev_id].beacon; if (!bcn) { - WMA_LOGE("%s: Failed alloc memory for beacon struct\n"); + WMA_LOGE("%s: Failed alloc memory for beacon struct", + __func__); add_bss->status = VOS_STATUS_E_FAILURE; goto send_fail_resp; } @@ -1477,8 +1478,8 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma, noa_ie.ctwindow = (u_int8_t)WMI_UNIFIED_NOA_ATTR_CTWIN_GET(p2p_noa_info); noa_ie.num_descriptors = (u_int8_t)WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET( p2p_noa_info); - WMA_LOGI("%s: index %lu, oppPs %lu, ctwindow %lu, " - "num_descriptors = %lu", __func__, noa_ie.index, + WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, " + "num_descriptors = %u", __func__, noa_ie.index, noa_ie.oppPS, noa_ie.ctwindow, noa_ie.num_descriptors); for(i = 0; i < noa_ie.num_descriptors; i++) { noa_ie.noa_descriptors[i].type_count = @@ -1489,8 +1490,8 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma, p2p_noa_info->noa_descriptors[i].interval; noa_ie.noa_descriptors[i].start_time = p2p_noa_info->noa_descriptors[i].start_time; - WMA_LOGI("%s: NoA descriptor[%d] type_count %lu, " - "duration %lu, interval %lu, start_time = %lu", + WMA_LOGI("%s: NoA descriptor[%d] type_count %u, " + "duration %u, interval %u, start_time = %u", __func__, i, noa_ie.noa_descriptors[i].type_count, noa_ie.noa_descriptors[i].duration, @@ -1687,9 +1688,18 @@ static int wma_gtk_offload_status_event(void *handle, u_int8_t *event, return -EINVAL; } - WMA_LOGD("GTK: got target status with replaycouter %x. vdev %d. " \ + WMA_LOGD("GTK: got target status with replay counter " + "%02x%02x%02x%02x%02x%02x%02x%02x. vdev %d. " "Refresh GTK %d times exchanges since last set operation.", - status->replay_counter, status->vdev_id, status->refresh_cnt); + status->replay_counter[0], + status->replay_counter[1], + status->replay_counter[2], + status->replay_counter[3], + status->replay_counter[4], + status->replay_counter[5], + status->replay_counter[6], + status->replay_counter[7], + status->vdev_id, status->refresh_cnt); WMA_LOGD("%s Exit", __func__); @@ -1887,8 +1897,8 @@ static int wma_p2p_noa_event_handler(void *handle, u_int8_t *event, u_int32_t le descriptors = WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(p2p_noa_info); noa_ie.num_descriptors = (u_int8_t)descriptors; - WMA_LOGI("%s: index %lu, oppPs %lu, ctwindow %lu, " - "num_descriptors = %lu", __func__, noa_ie.index, + WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, " + "num_descriptors = %u", __func__, noa_ie.index, noa_ie.oppPS, noa_ie.ctwindow, noa_ie.num_descriptors); for(i = 0; i < noa_ie.num_descriptors; i++) { noa_ie.noa_descriptors[i].type_count = @@ -1899,8 +1909,8 @@ static int wma_p2p_noa_event_handler(void *handle, u_int8_t *event, u_int32_t le p2p_noa_info->noa_descriptors[i].interval; noa_ie.noa_descriptors[i].start_time = p2p_noa_info->noa_descriptors[i].start_time; - WMA_LOGI("%s: NoA descriptor[%d] type_count %lu, " - "duration %lu, interval %lu, start_time = %lu", + WMA_LOGI("%s: NoA descriptor[%d] type_count %u, " + "duration %u, interval %u, start_time = %u", __func__, i, noa_ie.noa_descriptors[i].type_count, noa_ie.noa_descriptors[i].duration, @@ -2894,7 +2904,7 @@ static void wma_set_sap_keepalive(tp_wma_handle wma, u_int8_t vdev_id) wma->vos_context); if (NULL == mac) { - WMA_LOGE("%s: Failed to get mac"); + WMA_LOGE("%s: Failed to get mac", __func__); return; } @@ -4721,7 +4731,8 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, (vos_msg_t*)&vosMsg)) { VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, - "Failed to post the rsp to UMAC" , __func__); + "%s: Failed to post Scan Offload Rsp to UMAC", + __func__); } } break; @@ -5171,7 +5182,8 @@ VOS_STATUS wma_process_lphb_conf_req(tp_wma_handle wma_handle, return VOS_STATUS_E_FAILURE; } - WMA_LOGI("%s : LPHB configuration cmd id is %d\n", __func__); + WMA_LOGI("%s : LPHB configuration cmd id is %d", __func__, + lphb_conf_req->cmd); switch (lphb_conf_req->cmd) { case LPHB_SET_EN_PARAMS_INDID: vos_status = wma_lphb_conf_hbenable(wma_handle, @@ -9910,7 +9922,7 @@ static int32_t wma_set_force_sleep(tp_wma_handle wma, u_int32_t vdev_id, u_int8_ ret = wmi_unified_set_sta_ps_param(wma->wmi_handle, vdev_id, WMI_STA_PS_ENABLE_QPOWER, 0); if (ret) { - WMA_LOGE("Disable QPower Failed vdevId", vdev_id); + WMA_LOGE("Disable QPower Failed vdevId %d", vdev_id); return ret; } WMA_LOGD("QPower Disabled vdevId %d", vdev_id); @@ -10033,7 +10045,7 @@ static int32_t wma_set_qpower_force_sleep(tp_wma_handle wma, u_int32_t vdev_id, WMI_STA_PS_ENABLE_QPOWER, 1); if (ret) { - WMA_LOGE("Enable QPower Failed vdevId", vdev_id); + WMA_LOGE("Enable QPower Failed vdevId %d", vdev_id); return ret; } WMA_LOGD("QPower Enabled vdevId %d", vdev_id); @@ -10547,8 +10559,9 @@ static VOS_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno) vos_mem_copy(nlo_list[i].ssid.ssid.ssid, pno->aNetworks[i].ssId.ssId, nlo_list[i].ssid.ssid.ssid_len); - WMA_LOGD("index: %d ssid: %s len: %d", i, - nlo_list[i].ssid.ssid.ssid, + WMA_LOGD("index: %d ssid: %.*s len: %d", i, + nlo_list[i].ssid.ssid.ssid_len, + (char *) nlo_list[i].ssid.ssid.ssid, nlo_list[i].ssid.ssid.ssid_len); /* Copy rssi threshold */ @@ -13564,8 +13577,8 @@ VOS_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, mbpsx10_rate = pRateUpdateParams->mcastDataRate24GHz; paramId = WMI_VDEV_PARAM_MCAST_DATA_RATE; } - WMA_LOGD("%s: bssid = '%pM', vdev_id = %d, bcast = %ld, " - "mcast = %ld, NSS = %d, chanmode = %d\n", + WMA_LOGD("%s: bssid = '%pM', vdev_id = %d, bcast = %d, " + "mcast = %d, NSS = %d, chanmode = %d", __func__, pRateUpdateParams->bssid, vdev_id, pRateUpdateParams->bcastDataRate, pRateUpdateParams->mcastDataRate24GHz, @@ -13631,7 +13644,7 @@ VOS_STATUS wma_process_rate_update_indicate(tp_wma_handle wma, vdev_id, paramId, rate); WMA_LOGD("%s:X, ret = %d, vdev_id = %d, chanmode = 0x%x, " - "in_rate = %ld, out_rate = 0x%x, NSS = %d\n", + "in_rate = %d, out_rate = 0x%x, NSS = %d", __func__, ret, vdev_id, intr[vdev_id].chanmode, mbpsx10_rate, rate, pRateUpdateParams->nss); @@ -14505,8 +14518,8 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data, scan_event->event = wmi_event->event; - WMA_LOGI("WMA <-- wmi_scan_event : event %lu, scan_id %lu, " - "freq %lu, reason %lu", + WMA_LOGI("WMA <-- wmi_scan_event : event %u, scan_id %u, " + "freq %u, reason %u", wmi_event->event, wmi_event->scan_id, wmi_event->channel_freq, wmi_event->reason); @@ -14540,7 +14553,7 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data, break; } case WMI_SCAN_EVENT_RESTARTED: - WMA_LOGP("Unexpected Scan Event %lu", wmi_event->event); + WMA_LOGP("Unexpected Scan Event %u", wmi_event->event); break; } @@ -15323,7 +15336,7 @@ static int wma_channel_avoid_evt_handler(void *handle, u_int8_t *event, WMA_LOGD("Channel avoid event received with %d ranges", num_freq_ranges); for (freq_range_idx = 0; freq_range_idx < num_freq_ranges; freq_range_idx++) { afr_desc = (wmi_avoid_freq_range_desc *) (param_buf->avd_freq_range + freq_range_idx * sizeof(wmi_avoid_freq_range_desc)); - WMA_LOGD("range %d: tlv id = %lu, start freq = %lu, end freq = %lu", + WMA_LOGD("range %d: tlv id = %u, start freq = %u, end freq = %u", freq_range_idx, afr_desc->tlv_header, afr_desc->start_freq, @@ -17909,7 +17922,7 @@ wma_dfs_configure_channel(struct ieee80211com *dfs_ic, GFP_ATOMIC); if (dfs_ic->ic_curchan == NULL) { - WMA_LOGE("allocation of dfs_ic->ic_curchan failed %zu \n", + WMA_LOGE("%s: allocation of dfs_ic->ic_curchan failed %zu", __func__, sizeof(struct ieee80211_channel)); return NULL; |
