qcacmn: Remove error log for qdf_mem_malloc in wmi files

qdf layer already has the error trace

Change-Id: I4c63264f6674c6c2710368de4b5c9f24817ac74c
CRs-Fixed: 2376431
This commit is contained in:
Madhvapathi Sriram
2019-01-07 09:33:56 +05:30
committed by nshrivas
parent 1e618d6444
commit 610c0c8e41
4 changed files with 175 additions and 379 deletions

View File

@@ -712,10 +712,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
wmi_log_max_entry * sizeof(struct wmi_command_debug)); wmi_log_max_entry * sizeof(struct wmi_command_debug));
cmd_log_buf->size = wmi_log_max_entry; cmd_log_buf->size = wmi_log_max_entry;
if (!cmd_log_buf->buf) { if (!cmd_log_buf->buf)
WMI_LOGE("no memory for WMI command log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
cmd_log_buf->p_buf_tail_idx = &cmd_log_buf->buf_tail_idx; cmd_log_buf->p_buf_tail_idx = &cmd_log_buf->buf_tail_idx;
/* WMI commands TX completed */ /* WMI commands TX completed */
@@ -725,10 +724,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
wmi_log_max_entry * sizeof(struct wmi_command_debug)); wmi_log_max_entry * sizeof(struct wmi_command_debug));
cmd_tx_cmpl_log_buf->size = wmi_log_max_entry; cmd_tx_cmpl_log_buf->size = wmi_log_max_entry;
if (!cmd_tx_cmpl_log_buf->buf) { if (!cmd_tx_cmpl_log_buf->buf)
WMI_LOGE("no memory for WMI Command Tx Complete log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
cmd_tx_cmpl_log_buf->p_buf_tail_idx = cmd_tx_cmpl_log_buf->p_buf_tail_idx =
&cmd_tx_cmpl_log_buf->buf_tail_idx; &cmd_tx_cmpl_log_buf->buf_tail_idx;
@@ -739,10 +737,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
wmi_log_max_entry * sizeof(struct wmi_event_debug)); wmi_log_max_entry * sizeof(struct wmi_event_debug));
event_log_buf->size = wmi_log_max_entry; event_log_buf->size = wmi_log_max_entry;
if (!event_log_buf->buf) { if (!event_log_buf->buf)
WMI_LOGE("no memory for WMI Event log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
event_log_buf->p_buf_tail_idx = &event_log_buf->buf_tail_idx; event_log_buf->p_buf_tail_idx = &event_log_buf->buf_tail_idx;
/* WMI events when queued */ /* WMI events when queued */
@@ -752,10 +749,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
wmi_log_max_entry * sizeof(struct wmi_event_debug)); wmi_log_max_entry * sizeof(struct wmi_event_debug));
rx_event_log_buf->size = wmi_log_max_entry; rx_event_log_buf->size = wmi_log_max_entry;
if (!rx_event_log_buf->buf) { if (!rx_event_log_buf->buf)
WMI_LOGE("no memory for WMI Event Rx log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
rx_event_log_buf->p_buf_tail_idx = &rx_event_log_buf->buf_tail_idx; rx_event_log_buf->p_buf_tail_idx = &rx_event_log_buf->buf_tail_idx;
/* WMI Management commands */ /* WMI Management commands */
@@ -765,10 +761,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
wmi_mgmt_log_max_entry * sizeof(struct wmi_command_debug)); wmi_mgmt_log_max_entry * sizeof(struct wmi_command_debug));
mgmt_cmd_log_buf->size = wmi_mgmt_log_max_entry; mgmt_cmd_log_buf->size = wmi_mgmt_log_max_entry;
if (!mgmt_cmd_log_buf->buf) { if (!mgmt_cmd_log_buf->buf)
WMI_LOGE("no memory for WMI Management Command log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
mgmt_cmd_log_buf->p_buf_tail_idx = &mgmt_cmd_log_buf->buf_tail_idx; mgmt_cmd_log_buf->p_buf_tail_idx = &mgmt_cmd_log_buf->buf_tail_idx;
/* WMI Management commands Tx completed*/ /* WMI Management commands Tx completed*/
@@ -780,10 +775,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
sizeof(struct wmi_command_debug)); sizeof(struct wmi_command_debug));
mgmt_cmd_tx_cmp_log_buf->size = wmi_mgmt_log_max_entry; mgmt_cmd_tx_cmp_log_buf->size = wmi_mgmt_log_max_entry;
if (!mgmt_cmd_tx_cmp_log_buf->buf) { if (!mgmt_cmd_tx_cmp_log_buf->buf)
WMI_LOGE("no memory for WMI Management Command Tx complete log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
mgmt_cmd_tx_cmp_log_buf->p_buf_tail_idx = mgmt_cmd_tx_cmp_log_buf->p_buf_tail_idx =
&mgmt_cmd_tx_cmp_log_buf->buf_tail_idx; &mgmt_cmd_tx_cmp_log_buf->buf_tail_idx;
@@ -796,10 +790,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
sizeof(struct wmi_event_debug)); sizeof(struct wmi_event_debug));
mgmt_event_log_buf->size = wmi_mgmt_log_max_entry; mgmt_event_log_buf->size = wmi_mgmt_log_max_entry;
if (!mgmt_event_log_buf->buf) { if (!mgmt_event_log_buf->buf)
WMI_LOGE("no memory for WMI Management Event log buffer..");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
mgmt_event_log_buf->p_buf_tail_idx = &mgmt_event_log_buf->buf_tail_idx; mgmt_event_log_buf->p_buf_tail_idx = &mgmt_event_log_buf->buf_tail_idx;
/* WMI diag events when received */ /* WMI diag events when received */
@@ -811,10 +804,9 @@ static QDF_STATUS wmi_log_init(struct wmi_unified *wmi_handle)
sizeof(struct wmi_event_debug)); sizeof(struct wmi_event_debug));
diag_event_log_buf->size = wmi_diag_log_max_entry; diag_event_log_buf->size = wmi_diag_log_max_entry;
if (!diag_event_log_buf->buf) { if (!diag_event_log_buf->buf)
qdf_print("no memory for WMI diag event log buffer..\n");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
diag_event_log_buf->p_buf_tail_idx = &diag_event_log_buf->buf_tail_idx; diag_event_log_buf->p_buf_tail_idx = &diag_event_log_buf->buf_tail_idx;
qdf_spinlock_create(&wmi_handle->log_info.wmi_record_lock); qdf_spinlock_create(&wmi_handle->log_info.wmi_record_lock);
@@ -1575,8 +1567,10 @@ wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
WMI_MIN_HEAD_ROOM, 4), WMI_MIN_HEAD_ROOM, 4, WMI_MIN_HEAD_ROOM, 4), WMI_MIN_HEAD_ROOM, 4,
false, func, line); false, func, line);
if (!wmi_buf) if (!wmi_buf) {
wmi_nofl_err("%s:%d, failed to alloc len:%d", func, line, len);
return NULL; return NULL;
}
/* Clear the wmi buffer */ /* Clear the wmi buffer */
OS_MEMZERO(qdf_nbuf_data(wmi_buf), len); OS_MEMZERO(qdf_nbuf_data(wmi_buf), len);
@@ -2439,11 +2433,9 @@ void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx)
wmi_handle = wmi_handle =
(struct wmi_unified *) qdf_mem_malloc( (struct wmi_unified *) qdf_mem_malloc(
sizeof(struct wmi_unified)); sizeof(struct wmi_unified));
if (wmi_handle == NULL) { if (!wmi_handle)
WMI_LOGE("allocation of wmi handle failed %zu",
sizeof(struct wmi_unified));
return NULL; return NULL;
}
wmi_handle->scn_handle = soc->scn_handle; wmi_handle->scn_handle = soc->scn_handle;
wmi_handle->event_id = soc->event_id; wmi_handle->event_id = soc->event_id;
wmi_handle->event_handler = soc->event_handler; wmi_handle->event_handler = soc->event_handler;
@@ -2552,19 +2544,14 @@ void *wmi_unified_attach(void *scn_handle,
struct wmi_soc *soc; struct wmi_soc *soc;
soc = (struct wmi_soc *) qdf_mem_malloc(sizeof(struct wmi_soc)); soc = (struct wmi_soc *) qdf_mem_malloc(sizeof(struct wmi_soc));
if (soc == NULL) { if (!soc)
WMI_LOGE("Allocation of wmi_soc failed %zu",
sizeof(struct wmi_soc));
return NULL; return NULL;
}
wmi_handle = wmi_handle =
(struct wmi_unified *) qdf_mem_malloc( (struct wmi_unified *) qdf_mem_malloc(
sizeof(struct wmi_unified)); sizeof(struct wmi_unified));
if (wmi_handle == NULL) { if (!wmi_handle) {
qdf_mem_free(soc); qdf_mem_free(soc);
WMI_LOGE("allocation of wmi handle failed %zu",
sizeof(struct wmi_unified));
return NULL; return NULL;
} }
wmi_handle->soc = soc; wmi_handle->soc = soc;

View File

@@ -999,10 +999,8 @@ static QDF_STATUS extract_ndp_end_ind_tlv(wmi_unified_t wmi_handle,
buf_size = sizeof(**rsp) + event->num_ndp_end_indication_list * buf_size = sizeof(**rsp) + event->num_ndp_end_indication_list *
sizeof((*rsp)->ndp_map[0]); sizeof((*rsp)->ndp_map[0]);
*rsp = qdf_mem_malloc(buf_size); *rsp = qdf_mem_malloc(buf_size);
if (!(*rsp)) { if (!(*rsp))
WMI_LOGE("Failed to allocate memory");
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
}
(*rsp)->num_ndp_ids = event->num_ndp_end_indication_list; (*rsp)->num_ndp_ids = event->num_ndp_end_indication_list;
for (i = 0; i < (*rsp)->num_ndp_ids; i++) { for (i = 0; i < (*rsp)->num_ndp_ids; i++) {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -229,11 +229,9 @@ static QDF_STATUS fake_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
WMI_LOGP("%s : called", __func__); WMI_LOGP("%s : called", __func__);
/* Allocate and populate the response */ /* Allocate and populate the response */
resp = qdf_mem_malloc(sizeof(*resp)); resp = qdf_mem_malloc(sizeof(*resp));
if (!resp) { if (!resp)
WMI_LOGP("%s:Error allocating memory for the response.",
__func__);
return -ENOMEM; return -ENOMEM;
}
resp->vdev_id = update_ndl_param->vdev_id; resp->vdev_id = update_ndl_param->vdev_id;
resp->status = 0; resp->status = 0;

File diff suppressed because it is too large Load Diff