qcacmn: Remove error log for qdf_mem_malloc in target_if files

qdf layer already has the error trace

Change-Id: I2d752fafb6ee805206047bae9711aa0387f22f69
CRs-Fixed: 2376430
This commit is contained in:
Madhvapathi Sriram 2019-01-07 09:30:48 +05:30 • committed by nshrivas
commit 0c5bdd7e73
10 changed files with 43 additions and 112 deletions

View file

@ -141,7 +141,6 @@ QDF_STATUS target_if_init(get_psoc_handle_callback psoc_hdl_cb)
{
g_target_if_ctx = qdf_mem_malloc(sizeof(*g_target_if_ctx));
if (!g_target_if_ctx) {
target_if_err("Cannot allocate target if ctx");
QDF_ASSERT(0);
return QDF_STATUS_E_NOMEM;
}
@ -501,10 +500,8 @@ QDF_STATUS target_if_alloc_pdev_tgt_info(struct wlan_objmgr_pdev *pdev)
tgt_pdev_info = qdf_mem_malloc(sizeof(*tgt_pdev_info));
if (tgt_pdev_info == NULL) {
target_if_err("Failed to allocate pdev target info");
if (!tgt_pdev_info)
return QDF_STATUS_E_NOMEM;
}
wlan_pdev_set_tgt_if_handle(pdev, tgt_pdev_info);
@ -540,10 +537,8 @@ QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
tgt_psoc_info = qdf_mem_malloc(sizeof(*tgt_psoc_info));
if (tgt_psoc_info == NULL) {
target_if_err("Failed to allocate psoc target info");
if (!tgt_psoc_info)
return QDF_STATUS_E_NOMEM;
}
wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
target_psoc_set_preferred_hw_mode(tgt_psoc_info, WMI_HOST_HW_MODE_MAX);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -69,10 +69,8 @@ static QDF_STATUS target_if_cp_stats_extract_pdev_stats(
*/
ev->pdev_stats = qdf_mem_malloc(sizeof(*ev->pdev_stats) *
ev->num_pdev_stats);
if (!ev->pdev_stats) {
cp_stats_err("malloc failed");
if (!ev->pdev_stats)
return QDF_STATUS_E_NOMEM;
}
for (i = 0; i < ev->num_pdev_stats; i++) {
status = wmi_extract_pdev_stats(wmi_hdl, data, i, &pdev_stats);
@ -103,10 +101,8 @@ static QDF_STATUS target_if_cp_stats_extract_peer_stats(
ev->peer_stats = qdf_mem_malloc(sizeof(*ev->peer_stats) *
ev->num_peer_stats);
if (!ev->peer_stats) {
cp_stats_err("malloc failed");
if (!ev->peer_stats)
return QDF_STATUS_E_NOMEM;
}
db2dbm_enabled = wmi_service_enabled(wmi_hdl,
wmi_service_hw_db2dbm_support);
@ -145,10 +141,8 @@ static QDF_STATUS target_if_cp_stats_extract_cca_stats(
}
ev->cca_stats = qdf_mem_malloc(sizeof(*ev->cca_stats));
if (!ev->cca_stats) {
cp_stats_err("malloc failed");
if (!ev->cca_stats)
return QDF_STATUS_E_NOMEM;
}
ev->cca_stats->vdev_id = stats.vdev_id;
@ -175,10 +169,8 @@ static QDF_STATUS target_if_cp_stats_extract_vdev_summary_stats(
ev->vdev_summary_stats = qdf_mem_malloc(sizeof(*ev->vdev_summary_stats)
* ev->num_summary_stats);
if (!ev->vdev_summary_stats) {
cp_stats_err("malloc failed");
if (!ev->vdev_summary_stats)
return QDF_STATUS_E_NOMEM;
}
db2dbm_enabled = wmi_service_enabled(wmi_hdl,
wmi_service_hw_db2dbm_support);
@ -241,10 +233,9 @@ static QDF_STATUS target_if_cp_stats_extract_vdev_chain_rssi_stats(
ev->vdev_chain_rssi = qdf_mem_malloc(sizeof(*ev->vdev_chain_rssi) *
ev->num_chain_rssi_stats);
if (!ev->vdev_chain_rssi) {
cp_stats_err("malloc failed");
if (!ev->vdev_chain_rssi)
return QDF_STATUS_E_NOMEM;
}
db2dbm_enabled = wmi_service_enabled(wmi_hdl,
wmi_service_hw_db2dbm_support);
for (i = 0; i < ev->num_chain_rssi_stats; i++) {

View file

@ -147,10 +147,8 @@ QDF_STATUS target_if_direct_buf_rx_pdev_create_handler(
dbr_pdev_obj = qdf_mem_malloc(sizeof(*dbr_pdev_obj));
if (dbr_pdev_obj == NULL) {
direct_buf_rx_err("Failed to allocate dir buf rx pdev obj");
if (!dbr_pdev_obj)
return QDF_STATUS_E_NOMEM;
}
direct_buf_rx_info("Dbr pdev obj %pK", dbr_pdev_obj);
@ -178,8 +176,7 @@ QDF_STATUS target_if_direct_buf_rx_pdev_create_handler(
dbr_pdev_obj->dbr_mod_param = qdf_mem_malloc(num_modules *
sizeof(struct direct_buf_rx_module_param));
if (dbr_pdev_obj->dbr_mod_param == NULL) {
direct_buf_rx_err("Failed to allocate dir buf rx mod param");
if (!dbr_pdev_obj->dbr_mod_param) {
wlan_objmgr_pdev_component_obj_detach(pdev,
WLAN_TARGET_IF_COMP_DIRECT_BUF_RX,
dbr_pdev_obj);
@ -247,10 +244,8 @@ QDF_STATUS target_if_direct_buf_rx_psoc_create_handler(
dbr_psoc_obj = qdf_mem_malloc(sizeof(*dbr_psoc_obj));
if (!dbr_psoc_obj) {
direct_buf_rx_err("failed to alloc dir buf rx psoc obj");
if (!dbr_psoc_obj)
return QDF_STATUS_E_NOMEM;
}
direct_buf_rx_info("Dbr psoc obj %pK", dbr_psoc_obj);
@ -470,10 +465,8 @@ static QDF_STATUS target_if_dbr_init_ring(struct wlan_objmgr_pdev *pdev,
dbr_ring_cfg->num_ptr = num_entries;
mod_param->dbr_buf_pool = qdf_mem_malloc(num_entries * sizeof(
struct direct_buf_rx_buf_info));
if (!mod_param->dbr_buf_pool) {
direct_buf_rx_err("dir buf rx buf pool alloc failed");
if (!mod_param->dbr_buf_pool)
return QDF_STATUS_E_NOMEM;
}
ring_alloc_size = (num_entries * entry_size) + DBR_RING_BASE_ALIGN - 1;
dbr_ring_cfg->ring_alloc_size = ring_alloc_size;
@ -538,17 +531,14 @@ static QDF_STATUS target_if_dbr_init_srng(struct wlan_objmgr_pdev *pdev,
mod_param->dbr_ring_cap = qdf_mem_malloc(sizeof(
struct direct_buf_rx_ring_cap));
if (!mod_param->dbr_ring_cap) {
direct_buf_rx_err("Ring cap alloc failed");
if (!mod_param->dbr_ring_cap)
return QDF_STATUS_E_NOMEM;
}
/* Allocate memory for DBR Ring Config */
mod_param->dbr_ring_cfg = qdf_mem_malloc(sizeof(
struct direct_buf_rx_ring_cfg));
if (!mod_param->dbr_ring_cfg) {
direct_buf_rx_err("Ring config alloc failed");
qdf_mem_free(mod_param->dbr_ring_cap);
return QDF_STATUS_E_NOMEM;
}

View file

@ -365,10 +365,8 @@ int init_deinit_populate_dbr_ring_cap(struct wlan_objmgr_psoc *psoc,
sizeof(struct wlan_psoc_host_dbr_ring_caps) *
num_dbr_ring_caps);
if (!info->dbr_ring_cap) {
target_if_err("Mem alloc for DMA cap failed");
if (!info->dbr_ring_cap)
return -EINVAL;
}
for (cap_idx = 0; cap_idx < num_dbr_ring_caps; cap_idx++) {
status = wmi_extract_dbr_ring_cap_service_ready_ext(handle,

View file

@ -150,10 +150,8 @@ static int tgt_reg_chan_list_update_handler(ol_scn_t handle, uint8_t *event_buf,
}
reg_info = qdf_mem_malloc(sizeof(*reg_info));
if (!reg_info) {
target_if_err("memory allocation failed");
if (!reg_info)
return -ENOMEM;
}
if (wmi_extract_reg_chan_list_update_event(wmi_handle,
event_buf, reg_info, len)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -63,10 +63,8 @@ target_if_scan_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen)
event_info = qdf_mem_malloc(sizeof(*event_info));
if (!event_info) {
target_if_err("unable to allocate scan_event");
if (!event_info)
return -ENOMEM;
}
if (wmi_extract_vdev_scan_ev_param(wmi_handle, data,
&(event_info->event))) {
@ -115,10 +113,8 @@ int target_if_nlo_complete_handler(ol_scn_t scn, uint8_t *data,
}
event_info = qdf_mem_malloc(sizeof(*event_info));
if (!event_info) {
target_if_err("unable to allocate scan_event");
if (!event_info)
return -ENOMEM;
}
nlo_event = param_buf->fixed_param;
target_if_debug("PNO complete event received for vdev %d",
@ -165,10 +161,8 @@ int target_if_nlo_match_event_handler(ol_scn_t scn, uint8_t *data,
}
event_info = qdf_mem_malloc(sizeof(*event_info));
if (!event_info) {
target_if_err("unable to allocate scan_event");
if (!event_info)
return -ENOMEM;
}
nlo_event = param_buf->fixed_param;
target_if_debug("PNO match event received for vdev %d",

View file

@ -1875,10 +1875,9 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
}
spectral = (struct target_if_spectral *)qdf_mem_malloc(
sizeof(struct target_if_spectral));
if (!spectral) {
spectral_err("SPECTRAL : Memory allocation failed");
if (!spectral)
return spectral;
}
qdf_mem_zero(spectral, sizeof(struct target_if_spectral));
/* Store pdev in Spectral */
spectral->pdev_obj = pdev;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015,2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2015,2017-2019 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -85,10 +85,8 @@ target_if_populate_report_static_gen2(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_20_gen2));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_20_gen2);
qdf_mem_copy(report->data,
@ -106,10 +104,8 @@ target_if_populate_report_static_gen2(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_40_gen2));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_40_gen2);
qdf_mem_copy(report->data,
@ -127,10 +123,8 @@ target_if_populate_report_static_gen2(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_80_gen2));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_80_gen2);
qdf_mem_copy(report->data,
@ -149,10 +143,8 @@ target_if_populate_report_static_gen2(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_80_80_gen2));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_80_80_gen2);
qdf_mem_copy(report->data,
@ -171,10 +163,8 @@ target_if_populate_report_static_gen2(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_160_gen2));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_160_gen2);
qdf_mem_copy(report->data,
@ -223,10 +213,8 @@ target_if_populate_report_static_gen3(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_20_gen3));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_20_gen3);
qdf_mem_copy(report->data,
@ -244,10 +232,8 @@ target_if_populate_report_static_gen3(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_40_gen3));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_40_gen3);
qdf_mem_copy(report->data,
@ -265,10 +251,8 @@ target_if_populate_report_static_gen3(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_80_gen3));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_80_gen3);
qdf_mem_copy(report->data,
@ -287,10 +271,8 @@ target_if_populate_report_static_gen3(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_80_80_gen3));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_80_80_gen3);
qdf_mem_copy(report->data,
@ -309,10 +291,8 @@ target_if_populate_report_static_gen3(
report->data = (uint8_t *)
qdf_mem_malloc(sizeof(reportdata_160_gen3));
if (!report->data) {
spectral_err("Spectral simulation: Could not allocate memory for report data");
if (!report->data)
goto bad;
}
report->datasize = sizeof(reportdata_160_gen3);
qdf_mem_copy(report->data,
@ -390,10 +370,8 @@ target_if_populate_reportset_static(
report = (struct spectralsim_report *)
qdf_mem_malloc(sizeof(struct spectralsim_report));
if (!report) {
spectral_err("Spectral simulation: Could not allocate memory for report.");
if (!report)
goto bad;
}
qdf_mem_zero(report, sizeof(*report));
@ -660,10 +638,8 @@ target_if_spectral_sim_attach(struct target_if_spectral *spectral)
simctx = (struct spectralsim_context *)
qdf_mem_malloc(sizeof(struct spectralsim_context));
if (!simctx) {
spectral_err("Spectral simulation: Could not allocate memory for context");
if (!simctx)
return -EPERM;
}
qdf_mem_zero(simctx, sizeof(*simctx));

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015,2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2015,2017-2019 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -126,7 +126,6 @@ struct spectralsim_context {
qdf_mem_malloc(sizeof(struct spectralsim_reportset)); \
\
if ((reportset) == NULL) { \
spectral_err("Spectral simulation: Could not allocate memory for report set"); \
target_if_depopulate_simdata((simctx)); \
return -EPERM; \
} \

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -414,10 +414,9 @@ static QDF_STATUS target_if_wifi_pos_fill_ring(uint8_t ring_idx,
for (i = 0; i < priv->dma_cfg[ring_idx].num_ptr; i++) {
buf = qdf_mem_malloc(priv->dma_cap[ring_idx].min_buf_size +
priv->dma_cap[ring_idx].min_buf_align - 1);
if (!buf) {
target_if_err("malloc failed");
if (!buf)
return QDF_STATUS_E_NOMEM;
}
priv->dma_buf_pool[ring_idx][i].vaddr = buf;
buf_aligned = (void *)qdf_roundup((uint64_t)buf,
priv->dma_cap[ring_idx].min_buf_align);
@ -463,10 +462,8 @@ static QDF_STATUS target_if_wifi_pos_init_ring(uint8_t ring_idx,
priv->dma_cfg[ring_idx].num_ptr = num_entries;
priv->dma_buf_pool[ring_idx] = qdf_mem_malloc(num_entries *
sizeof(struct wifi_pos_dma_buf_info));
if (!priv->dma_buf_pool[ring_idx]) {
target_if_err("malloc failed");
if (!priv->dma_buf_pool[ring_idx])
return QDF_STATUS_E_NOMEM;
}
ring_alloc_size = (num_entries * entry_size) + RING_BASE_ALIGN - 1;
priv->dma_cfg[ring_idx].ring_alloc_size = ring_alloc_size;
@ -529,17 +526,13 @@ static QDF_STATUS target_if_wifi_pos_init_srngs(
/* allocate memory for num_rings pointers */
priv->dma_cfg = qdf_mem_malloc(priv->num_rings *
sizeof(struct wifi_pos_dma_rings_cap));
if (!priv->dma_cfg) {
target_if_err("malloc failed");
if (!priv->dma_cfg)
return QDF_STATUS_E_NOMEM;
}
priv->dma_buf_pool = qdf_mem_malloc(priv->num_rings *
sizeof(struct wifi_pos_dma_buf_info *));
if (!priv->dma_buf_pool) {
target_if_err("malloc failed");
if (!priv->dma_buf_pool)
return QDF_STATUS_E_NOMEM;
}
for (i = 0; i < priv->num_rings; i++) {
status = target_if_wifi_pos_init_ring(i, priv);
@ -635,10 +628,8 @@ QDF_STATUS target_if_wifi_pos_init_cir_cfr_rings(struct wlan_objmgr_psoc *psoc,
priv->num_rings = num_mac;
priv->dma_cap = qdf_mem_malloc(priv->num_rings *
sizeof(struct wifi_pos_dma_rings_cap));
if (!priv->dma_cap) {
target_if_err("unable to get wifi_pos psoc obj");
if (!priv->dma_cap)
return QDF_STATUS_E_NOMEM;
}
for (i = 0; i < num_mac; i++) {
priv->dma_cap[i].pdev_id = dma_cap[i].pdev_id;