qcacld-3.0: Remove logs for wlan_hdd_validate_context() checks

wlan_hdd_validate_context() function already takes care of logging
the caller function name in case of any error. Hence there is no need to
add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: Ia1f4a1a413249e10c40d7644e9ffb314e991b237
CRs-Fixed: 2769591
This commit is contained in:
Srinivas Girigowda 2020-09-03 15:17:12 -07:00 • committed by snandini
commit 375cf9be91
6 changed files with 13 additions and 34 deletions

View file

@ -23780,10 +23780,8 @@ static void wlan_hdd_chan_info_cb(struct scan_chan_info *info)
uint8_t idx;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (wlan_hdd_validate_context(hdd_ctx) != 0) {
hdd_err("hdd_ctx is invalid");
if (wlan_hdd_validate_context(hdd_ctx) != 0)
return;
}
if (!hdd_ctx->chan_info) {
hdd_err("chan_info is NULL");
@ -23965,10 +23963,9 @@ static int __wlan_hdd_cfg80211_set_chainmask(struct wiphy *wiphy,
enum hdd_chain_mode chains;
ret = wlan_hdd_validate_context(hdd_ctx);
if (ret) {
hdd_err_rl("Invalid Hdd Context");
if (ret)
return -EINVAL;
}
if (hdd_ctx->num_rf_chains != HDD_ANTENNA_MODE_2X2 ||
!ucfg_mlme_is_chain_mask_supported(hdd_ctx->psoc)) {
hdd_info_rl("Chainmask can't be configured, num of rf chain %d",
@ -24022,10 +24019,9 @@ static int __wlan_hdd_cfg80211_get_chainmask(struct wiphy *wiphy,
int ret;
ret = wlan_hdd_validate_context(hdd_ctx);
if (ret) {
hdd_err_rl("Invalid Hdd Context");
if (ret)
return -EINVAL;
}
*tx_mask = wma_cli_get_command(0, WMI_PDEV_PARAM_TX_CHAIN_MASK,
PDEV_CMD);
*rx_mask = wma_cli_get_command(0, WMI_PDEV_PARAM_RX_CHAIN_MASK,

View file

@ -1076,10 +1076,8 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params)
}
err = wlan_hdd_validate_context(hdd_ctx);
if (err) {
hdd_err("Invalid hdd context: %d", err);
if (err)
return err;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (!hif_ctx) {
@ -1208,10 +1206,8 @@ int wlan_hdd_bus_suspend_noirq(void)
}
errno = wlan_hdd_validate_context(hdd_ctx);
if (errno) {
hdd_err("Invalid HDD context: errno %d", errno);
if (errno)
return errno;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (!hif_ctx) {
@ -1292,10 +1288,8 @@ int wlan_hdd_bus_resume(void)
}
status = wlan_hdd_validate_context(hdd_ctx);
if (status) {
hdd_err("Invalid hdd context");
if (status)
return status;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (!hif_ctx) {
@ -1388,10 +1382,8 @@ int wlan_hdd_bus_resume_noirq(void)
}
status = wlan_hdd_validate_context(hdd_ctx);
if (status) {
hdd_err("Invalid HDD context: %d", status);
if (status)
return status;
}
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
if (!hif_ctx)

View file

@ -1078,10 +1078,8 @@ static void __wlan_hdd_sap_pre_cac_failure(struct hdd_adapter *adapter)
hdd_enter();
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
if (wlan_hdd_validate_context(hdd_ctx)) {
hdd_err("HDD context is null");
if (wlan_hdd_validate_context(hdd_ctx))
return;
}
wlan_hdd_release_intf_addr(hdd_ctx, adapter->mac_addr.bytes);
hdd_stop_adapter(hdd_ctx, adapter);

View file

@ -978,10 +978,8 @@ static void oem_cmd_handler(const void *data, int data_len, void *ctx, int pid)
struct nlattr *tb[CLD80211_ATTR_MAX + 1];
ret = wlan_hdd_validate_context(p_hdd_ctx);
if (ret) {
hdd_err("hdd ctx validate fails");
if (ret)
return;
}
/*
* audit note: it is ok to pass a NULL policy here since only

View file

@ -322,10 +322,8 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
return -EINVAL;
ret = wlan_hdd_validate_context(hdd_ctx);
if (ret) {
hdd_err("wlan_hdd_validate_context return:%d", ret);
if (ret)
return ret;
}
type = WLAN_HDD_GET_TYPE_FRM_FC(buf[0]);
sub_type = WLAN_HDD_GET_SUBTYPE_FRM_FC(buf[0]);

View file

@ -1010,11 +1010,8 @@ static void __hdd_hard_start_xmit(struct sk_buff *skb,
}
hdd_ctx = adapter->hdd_ctx;
if (wlan_hdd_validate_context(hdd_ctx)) {
QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_HDD_DATA,
"Invalid HDD context");
if (wlan_hdd_validate_context(hdd_ctx))
goto drop_pkt;
}
wlan_hdd_classify_pkt(skb);
if (QDF_NBUF_CB_GET_PACKET_TYPE(skb) == QDF_NBUF_CB_PACKET_TYPE_ARP) {