diff options
| author | Selvaraj, Sridhar <sselvara@codeaurora.org> | 2016-10-19 15:38:47 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-24 16:45:11 -0700 |
| commit | af901441736fe03d34e675f5bdd83ddc69334062 (patch) | |
| tree | 229d02e19f53ad046f35080dadac469350debe21 | |
| parent | 4d91e770a430003691ffa3aaf20a558ac1d00cef (diff) | |
qcacld-3.0: Remove redundant mem zero after malloc in HDD
Remove redundant qdf_mem_zero after qdf_mem_malloc since output
of qdf_mem_malloc already gives zeroed memory[i.e. kzalloc].
Change-Id: I3190e56ad7b8c12c4dc8357b1e1238e04f651d6a
CRs-Fixed: 1079659
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ext_scan.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_green_ap.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ioctl.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ocb.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 3 |
12 files changed, 0 insertions, 22 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 584830a1d62d..b92c3c74e6a5 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -6876,7 +6876,6 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx) "%s: unable to allocate smeConfig", __func__); return QDF_STATUS_E_NOMEM; } - qdf_mem_zero(smeConfig, sizeof(*smeConfig)); QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_HIGH, "%s bWmmIsEnabled=%d 802_11e_enabled=%d dot11Mode=%d", diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 052c80abae02..2e9494a6182b 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -6465,7 +6465,6 @@ static int hdd_set_reset_bpf_offload(hdd_context_t *hdd_ctx, hdd_err("qdf_mem_malloc failed for bpf_set_offload"); return -ENOMEM; } - qdf_mem_zero(bpf_set_offload, sizeof(*bpf_set_offload)); /* Parse and fetch bpf packet size */ if (!tb[BPF_PACKET_SIZE]) { @@ -9215,7 +9214,6 @@ static void wlan_hdd_set_dhcp_server_offload(hdd_adapter_t *pHostapdAdapter) hdd_err("could not allocate tDhcpSrvOffloadInfo!"); return; } - qdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo)); pDhcpSrvInfo->vdev_id = pHostapdAdapter->sessionId; pDhcpSrvInfo->dhcpSrvOffloadEnabled = true; pDhcpSrvInfo->dhcpClientNum = pHddCtx->config->dhcpMaxNumClients; @@ -11482,7 +11480,6 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, eConnectionState_NotConnected); return -ENOMEM; } - qdf_mem_zero(sme_config, sizeof(*sme_config)); sme_get_config_param(pHddCtx->hHal, sme_config); /* These values are not sessionized. So, any change in these SME * configs on an older or parallel interface will affect the diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index b81bab3665de..d0a968daf69c 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -3894,7 +3894,6 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy, hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } - qdf_mem_zero(req_msg, len); req_msg->num_networks = num_networks; /* Parse and fetch request Id */ diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c index 1dccc70ae1c6..01afbd5a178a 100644 --- a/core/hdd/src/wlan_hdd_green_ap.c +++ b/core/hdd/src/wlan_hdd_green_ap.c @@ -315,7 +315,6 @@ static QDF_STATUS hdd_green_ap_attach(struct hdd_context_s *hdd_ctx) goto error; } - qdf_mem_zero(green_ap, sizeof(*green_ap)); green_ap->ps_state = GREEN_AP_PS_OFF_STATE; green_ap->ps_event = 0; green_ap->num_nodes = 0; diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 989892b26b80..c3dd96c240fe 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1532,7 +1532,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, hdd_err("Failed to allocate station info"); return QDF_STATUS_E_FAILURE; } - memset(sta_info, 0, sizeof(*sta_info)); if (iesLen <= MAX_ASSOC_IND_IE_LEN) { sta_info->assoc_req_ies = (const u8 *)&pSapEvent->sapevt. diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index e08879e1a6f8..21be7321f4c9 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -1162,7 +1162,6 @@ hdd_sendactionframe(hdd_adapter_t *adapter, const uint8_t *bssid, ret = -ENOMEM; goto exit; } - qdf_mem_zero(frame, frame_len); hdr = (struct ieee80211_hdr_3addr *)frame; hdr->frame_control = @@ -2819,7 +2818,6 @@ static int hdd_parse_get_cckm_ie(uint8_t *pValue, uint8_t **pCckmIe, hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } - qdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2); /* * the buffer received from the upper layer is character buffer, * we need to prepare the buffer taking 2 characters in to a U8 hex @@ -4854,7 +4852,6 @@ static int drv_cmd_set_ibss_beacon_oui_data(hdd_adapter_t *adapter, ret = -ENOMEM; goto exit; } - qdf_mem_zero(ibss_ie, command_len); ibss_ie_length = hdd_parse_set_ibss_oui_data_command(value, ibss_ie, &oui_length, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 943f265fe6fb..d092dd8b55e3 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -6894,8 +6894,6 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) return -ENOMEM; } - qdf_mem_zero(cds_cfg, sizeof(*cds_cfg)); - /* UMA is supported in hardware for performing the * frame translation 802.11 <-> 802.3 */ diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c index 9b435ce7dac3..f86a6f11f6dc 100644 --- a/core/hdd/src/wlan_hdd_ocb.c +++ b/core/hdd/src/wlan_hdd_ocb.c @@ -325,7 +325,6 @@ static struct sir_ocb_config *hdd_ocb_config_new(int num_channels, if (!cursor) goto fail; - qdf_mem_zero(cursor, len); ret = cursor; cursor += sizeof(*ret); @@ -1121,7 +1120,6 @@ __wlan_hdd_cfg80211_ocb_start_timing_advert(struct wiphy *wiphy, hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } - qdf_mem_zero(timing_advert, sizeof(*timing_advert)); timing_advert->vdev_id = adapter->sessionId; /* Parse the netlink message */ @@ -1239,7 +1237,6 @@ __wlan_hdd_cfg80211_ocb_stop_timing_advert(struct wiphy *wiphy, hdd_err("qdf_mem_malloc failed"); return -ENOMEM; } - qdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert))); timing_advert->vdev_id = adapter->sessionId; /* Parse the netlink message */ diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index bfe19b409a1f..f74f14243399 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -823,7 +823,6 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, return -ENOMEM; } - qdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx)); qdf_mem_copy(&pRemainChanCtx->chan, chan, sizeof(struct ieee80211_channel)); pRemainChanCtx->duration = duration; diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index ffc48c3e714a..380083814306 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1057,7 +1057,6 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set) hdd_err("Could not allocate Memory"); return; } - qdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList)); pMulticastAddrs->action = set; if (set) { diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index a23809100cb8..a52f9ae6b0aa 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -2263,7 +2263,6 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, return -ENOMEM; } - memset(pPnoRequest, 0, sizeof(tSirPNOScanReq)); pPnoRequest->enable = 1; /*Enable PNO */ pPnoRequest->ucNetworksCount = request->n_match_sets; @@ -2534,7 +2533,6 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy, return -ENOMEM; } - memset(pPnoRequest, 0, sizeof(tSirPNOScanReq)); pPnoRequest->enable = 0; /* Disable PNO */ pPnoRequest->ucNetworksCount = 0; diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index a433ab503abf..0227bd10d69e 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -741,8 +741,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) hdd_err("malloc failed!"); return -ENOMEM; } - /* initialize TDLS pAdater context */ - qdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t)); /* Initialize connection tracker timer */ qdf_mc_timer_init(&pHddTdlsCtx->peer_update_timer, @@ -1023,7 +1021,6 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, const u8 *mac, key = wlan_hdd_tdls_hash_key(mac); head = &pHddTdlsCtx->peer_list[key]; - qdf_mem_zero(peer, sizeof(hddTdlsPeer_t)); qdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac)); peer->pHddTdlsCtx = pHddTdlsCtx; peer->pref_off_chan_num = pHddCtx->config->fTDLSPrefOffChanNum; |
