From 648ce114abb2fbb73524200c5bef7ba2f9c14fae Mon Sep 17 00:00:00 2001 From: Aditya Sathish Date: Mon, 2 Jul 2018 16:41:39 +0530 Subject: [PATCH] qcacmn: Clean up hif and htc component prints Clean up hif and htc component prints by correcting trace levels for regularly occurring prints and removing newlines from converged print APIs since qdf_trace_msg appends them by default. Change-Id: I45b1bbe7b16ab7fb8e229b59a094c7382561d658 CRs-Fixed: 2243843 --- hif/src/ce/ce_main.c | 16 +++++++------- hif/src/ce/ce_service.c | 16 +++++++------- hif/src/hif_exec.c | 4 ++-- hif/src/mp_dev.c | 4 ++-- hif/src/pcie/if_pci.c | 38 ++++++++++++++++----------------- hif/src/sdio/transfer/mailbox.c | 2 +- hif/src/snoc/if_ahb_reset.c | 4 ++-- htc/htc.c | 4 ++-- htc/htc_send.c | 8 +++---- htc/htc_services.c | 6 +++--- 10 files changed, 51 insertions(+), 51 deletions(-) diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 0906aa1bdc5b..e90c8282fa62 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -2637,11 +2637,11 @@ static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg) { int i; QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, - "%s: num_config %d\n", __func__, cfg->num_shadow_reg_v2_cfg); + "%s: num_config %d", __func__, cfg->num_shadow_reg_v2_cfg); for (i = 0; i < cfg->num_shadow_reg_v2_cfg; i++) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO, - "%s: i %d, val %x\n", __func__, i, + "%s: i %d, val %x", __func__, i, cfg->shadow_reg_v2_cfg[i].addr); } } @@ -2650,7 +2650,7 @@ static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg) static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, - "%s: CONFIG_SHADOW_V2 not defined\n", __func__); + "%s: CONFIG_SHADOW_V2 not defined", __func__); } #endif @@ -3597,19 +3597,19 @@ int hif_dump_ce_registers(struct hif_softc *scn) qdf_trace_hex_dump(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_DEBUG, (uint8_t *) &ce_reg_values[0], ce_reg_word_size * sizeof(uint32_t)); - qdf_print("ADDR:[0x%08X], SR_WR_INDEX:%d\n", (ce_reg_address + qdf_print("ADDR:[0x%08X], SR_WR_INDEX:%d", (ce_reg_address + SR_WR_INDEX_ADDRESS), ce_reg_values[SR_WR_INDEX_ADDRESS/4]); - qdf_print("ADDR:[0x%08X], CURRENT_SRRI:%d\n", (ce_reg_address + qdf_print("ADDR:[0x%08X], CURRENT_SRRI:%d", (ce_reg_address + CURRENT_SRRI_ADDRESS), ce_reg_values[CURRENT_SRRI_ADDRESS/4]); - qdf_print("ADDR:[0x%08X], DST_WR_INDEX:%d\n", (ce_reg_address + qdf_print("ADDR:[0x%08X], DST_WR_INDEX:%d", (ce_reg_address + DST_WR_INDEX_ADDRESS), ce_reg_values[DST_WR_INDEX_ADDRESS/4]); - qdf_print("ADDR:[0x%08X], CURRENT_DRRI:%d\n", (ce_reg_address + qdf_print("ADDR:[0x%08X], CURRENT_DRRI:%d", (ce_reg_address + CURRENT_DRRI_ADDRESS), ce_reg_values[CURRENT_DRRI_ADDRESS/4]); - qdf_print("---\n"); + qdf_print("---"); } return 0; } diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c index f2cd9bcfe715..1b07cf16e2c8 100644 --- a/hif/src/ce/ce_service.c +++ b/hif/src/ce/ce_service.c @@ -2875,7 +2875,7 @@ ssize_t hif_dump_desc_event(struct hif_softc *scn, char *buf) (struct hif_ce_desc_event *)ce_hist->hist_ev[ce_hist->hist_id]; if (!hist_ev) { - qdf_print("Low Memory\n"); + qdf_print("Low Memory"); return -EINVAL; } @@ -2883,7 +2883,7 @@ ssize_t hif_dump_desc_event(struct hif_softc *scn, char *buf) if ((ce_hist->hist_id >= CE_COUNT_MAX) || (ce_hist->hist_index >= HIF_CE_HISTORY_MAX)) { - qdf_print("Invalid values\n"); + qdf_print("Invalid values"); return -EINVAL; } @@ -2953,7 +2953,7 @@ ssize_t hif_input_desc_trace_buf_index(struct hif_softc *scn, } if ((ce_hist->hist_id >= CE_COUNT_MAX) || (ce_hist->hist_index >= HIF_CE_HISTORY_MAX)) { - qdf_print("Invalid values\n"); + qdf_print("Invalid values"); return -EINVAL; } @@ -2996,12 +2996,12 @@ ssize_t hif_ce_en_desc_hist(struct hif_softc *scn, const char *buf, size_t size) return -EINVAL; } if (ce_id >= CE_COUNT_MAX) { - qdf_print("Invalid value CE Id\n"); + qdf_print("Invalid value CE Id"); return -EINVAL; } if ((cfg > 1 || cfg < 0)) { - qdf_print("Invalid values: enter 0 or 1\n"); + qdf_print("Invalid values: enter 0 or 1"); return -EINVAL; } @@ -3011,18 +3011,18 @@ ssize_t hif_ce_en_desc_hist(struct hif_softc *scn, const char *buf, size_t size) qdf_mutex_acquire(&ce_dbg_datamem_lock[ce_id]); if (cfg == 1) { if (ce_hist->data_enable[ce_id] == 1) { - qdf_print("\nAlready Enabled\n"); + qdf_print("\nAlready Enabled"); } else { if (alloc_mem_ce_debug_hist_data(scn, ce_id) == QDF_STATUS_E_NOMEM){ ce_hist->data_enable[ce_id] = 0; - qdf_print("%s:Memory Alloc failed\n"); + qdf_print("%s:Memory Alloc failed"); } else ce_hist->data_enable[ce_id] = 1; } } else if (cfg == 0) { if (ce_hist->data_enable[ce_id] == 0) { - qdf_print("\nAlready Disabled\n"); + qdf_print("\nAlready Disabled"); } else { ce_hist->data_enable[ce_id] = 0; free_mem_ce_debug_hist_data(scn, ce_id); diff --git a/hif/src/hif_exec.c b/hif/src/hif_exec.c index 2275a05efeb8..96ef52e02cc7 100644 --- a/hif/src/hif_exec.c +++ b/hif/src/hif_exec.c @@ -46,7 +46,7 @@ void hif_print_napi_stats(struct hif_opaque_softc *hif_ctx) int i, j; QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_FATAL, - "NAPI[#ctx]CPU[#] |schedules |polls |completes |workdone\n"); + "NAPI[#ctx]CPU[#] |schedules |polls |completes |workdone"); for (i = 0; i < hif_state->hif_num_extgroup; i++) { if (hif_state->hif_ext_group[i]) { @@ -57,7 +57,7 @@ void hif_print_napi_stats(struct hif_opaque_softc *hif_ctx) QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_FATAL, "NAPI[%2d]CPU[%d]: " - "%7d %7d %7d %7d \n", + "%7d %7d %7d %7d ", i, j, napi_stats->napi_schedules, napi_stats->napi_polls, diff --git a/hif/src/mp_dev.c b/hif/src/mp_dev.c index 8e7bbff06b51..e5f2d80215d5 100644 --- a/hif/src/mp_dev.c +++ b/hif/src/mp_dev.c @@ -222,8 +222,8 @@ void priv_dump_chaninfo(struct hif_softc *scn) tmp = hif_read32_mb(scn, scn->mem + BB_chn1_tables_intf_data); - qdf_debug("0x%x\n", (tmp >> 16) & 0x0000ffff); - qdf_debug("0x%x\n", tmp & 0x0000ffff); + qdf_debug("0x%x", (tmp >> 16) & 0x0000ffff); + qdf_debug("0x%x", tmp & 0x0000ffff); if (i % 2 == 0) qdf_debug("\n"); } diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 4124a3f0231e..1fc380851e95 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -315,7 +315,7 @@ int hif_get_irq_num(struct hif_opaque_softc *scn, int *irq, uint32_t size) } if (sc->num_msi_intrs > size) { - qdf_print("Not enough space in irq buffer to return irqs\n"); + qdf_print("Not enough space in irq buffer to return irqs"); return -EINVAL; } @@ -1547,8 +1547,8 @@ static void hif_set_hia_extnd(struct hif_softc *scn) tgt_info->target_revision = CHIP_ID_REVISION_GET(hif_read32_mb(scn, scn->mem + CHIP_ID_ADDRESS)); - qdf_print(KERN_INFO"chip_id 0x%x chip_revision 0x%x\n", - target_type, tgt_info->target_revision); + qdf_print("chip_id 0x%x chip_revision 0x%x", + target_type, tgt_info->target_revision); } { @@ -1561,14 +1561,14 @@ static void hif_set_hia_extnd(struct hif_softc *scn) (frac != -1) && (intval != -1)) { hif_diag_read_access(hif_hdl, flag2_targ_addr, &flag2_value); - qdf_print("\n Setting clk_override\n"); + qdf_print("\n Setting clk_override"); flag2_value |= CLOCK_OVERRIDE; hif_diag_write_access(hif_hdl, flag2_targ_addr, flag2_value); - qdf_print("\n CLOCK PLL val set %d\n", flag2_value); + qdf_print("\n CLOCK PLL val set %d", flag2_value); } else { - qdf_print(KERN_INFO"\n CLOCK PLL skipped\n"); + qdf_print("\n CLOCK PLL skipped"); } } @@ -1583,7 +1583,7 @@ static void hif_set_hia_extnd(struct hif_softc *scn) */ qdf_print(KERN_INFO - "%s: setting the target pll frac %x intval %x\n", + "%s: setting the target pll frac %x intval %x", __func__, frac, intval); /* do not touch frac, and int val, let them be default -1, @@ -1599,16 +1599,16 @@ static void hif_set_hia_extnd(struct hif_softc *scn) hi_clock_info)); hif_diag_read_access(hif_hdl, flag2_targ_addr, &flag2_value); - qdf_print("\n ====> FRAC Val %x Address %x\n", frac, - flag2_value); + qdf_print("\n ====> FRAC Val %x Address %x", frac, + flag2_value); hif_diag_write_access(hif_hdl, flag2_value, frac); - qdf_print("\n INT Val %x Address %x\n", - intval, flag2_value + 4); + qdf_print("\n INT Val %x Address %x", + intval, flag2_value + 4); hif_diag_write_access(hif_hdl, flag2_value + 4, intval); } else { qdf_print(KERN_INFO - "%s: no frac provided, skipping pre-configuring PLL\n", + "%s: no frac provided, skipping pre-configuring PLL", __func__); } @@ -1625,7 +1625,7 @@ static void hif_set_hia_extnd(struct hif_softc *scn) hi_desired_cpu_speed_hz)); hif_diag_read_access(hif_hdl, flag2_targ_addr, &flag2_value); - qdf_print("\n ==> hi_desired_cpu_speed_hz Address %x\n", + qdf_print("\n ==> hi_desired_cpu_speed_hz Address %x", flag2_value); hif_diag_write_access(hif_hdl, flag2_value, ar900b_20_targ_clk/*300000000u*/); @@ -1644,7 +1644,7 @@ static void hif_set_hia_extnd(struct hif_softc *scn) hif_diag_write_access(hif_hdl, flag2_targ_addr, qca9888_20_targ_clk); } else { - qdf_print(KERN_INFO"%s: targ_clk is not provided, skipping pre-configuring PLL\n", + qdf_print("%s: targ_clk is not provided, skipping pre-configuring PLL", __func__); } } else { @@ -1656,13 +1656,13 @@ static void hif_set_hia_extnd(struct hif_softc *scn) hi_clock_info)); hif_diag_read_access(hif_hdl, flag2_targ_addr, &flag2_value); - qdf_print("\n ====> FRAC Val %x Address %x\n", frac, - flag2_value); + qdf_print("\n ====> FRAC Val %x Address %x", frac, + flag2_value); hif_diag_write_access(hif_hdl, flag2_value, frac); - qdf_print("\n INT Val %x Address %x\n", intval, - flag2_value + 4); + qdf_print("\n INT Val %x Address %x", intval, + flag2_value + 4); hif_diag_write_access(hif_hdl, flag2_value + 4, - intval); + intval); } } } diff --git a/hif/src/sdio/transfer/mailbox.c b/hif/src/sdio/transfer/mailbox.c index 82fd6c724771..c52ca677f430 100644 --- a/hif/src/sdio/transfer/mailbox.c +++ b/hif/src/sdio/transfer/mailbox.c @@ -686,7 +686,7 @@ static QDF_STATUS hif_dev_issue_recv_packet_bundle total_length += padded_length; } #if DEBUG_BUNDLE - qdf_print("Recv bundle count %d, length %d.\n", + qdf_print("Recv bundle count %d, length %d.", sync_completion_queue ? HTC_PACKET_QUEUE_DEPTH(sync_completion_queue) : 0, total_length); diff --git a/hif/src/snoc/if_ahb_reset.c b/hif/src/snoc/if_ahb_reset.c index 24ec3ad07f1a..c2a0d9fc502b 100644 --- a/hif/src/snoc/if_ahb_reset.c +++ b/hif/src/snoc/if_ahb_reset.c @@ -250,7 +250,7 @@ int hif_ahb_enable_radio(struct hif_pci_softc *sc, struct platform_device *pdev, const struct platform_device_id *id) { - qdf_print("%s:%d:Reset routines not available in kernel version.\n", + qdf_print("%s:%d:Reset routines not available in kernel version.", __func__, __LINE__); return -EIO; } @@ -389,7 +389,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) #else void hif_ahb_device_reset(struct hif_softc *scn) { - qdf_print("%s:%d:Reset routines not available in kernel version.\n", + qdf_print("%s:%d:Reset routines not available in kernel version.", __func__, __LINE__); } #endif diff --git a/htc/htc.c b/htc/htc.c index d48724367b09..5b13c6ef1168 100644 --- a/htc/htc.c +++ b/htc/htc.c @@ -81,7 +81,7 @@ static HTC_PACKET *build_htc_tx_ctrl_packet(qdf_device_t osdev) if (NULL == netbuf) { qdf_mem_free(pPacket); pPacket = NULL; - qdf_print("%s: nbuf alloc failed\n", __func__); + qdf_print("%s: nbuf alloc failed", __func__); break; } AR_DEBUG_PRINTF(ATH_DEBUG_TRC, @@ -701,7 +701,7 @@ QDF_STATUS htc_start(HTC_HANDLE HTCHandle) pSendPacket = htc_alloc_control_tx_packet(target); if (NULL == pSendPacket) { AR_DEBUG_ASSERT(false); - qdf_print("%s: allocControlTxPacket failed\n", + qdf_print("%s: allocControlTxPacket failed", __func__); status = QDF_STATUS_E_NOMEM; break; diff --git a/htc/htc_send.c b/htc/htc_send.c index f3408334ff05..f2930bbd72f3 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -321,7 +321,7 @@ static QDF_STATUS htc_send_bundled_netbuf(HTC_TARGET *target, pEndpoint->ul_outstanding_cnt++; UNLOCK_HTC_TX(target); #if DEBUG_BUNDLE - qdf_print(" Send bundle EP%d buffer size:0x%x, total:0x%x, count:%d.\n", + qdf_print(" Send bundle EP%d buffer size:0x%x, total:0x%x, count:%d.", pEndpoint->Id, pEndpoint->TxCreditSize, data_len, data_len / pEndpoint->TxCreditSize); @@ -335,7 +335,7 @@ static QDF_STATUS htc_send_bundled_netbuf(HTC_TARGET *target, pEndpoint->Id, data_len, bundleBuf, data_attr); if (status != QDF_STATUS_SUCCESS) { - qdf_print("%s:hif_send_head failed(len=%zu).\n", __func__, + qdf_print("%s:hif_send_head failed(len=%zu).", __func__, data_len); } return status; @@ -608,7 +608,7 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target, if (pPacket->PktInfo.AsTx.Tag == HTC_TX_PACKET_TAG_RUNTIME_PUT) rt_put = true; #if DEBUG_BUNDLE - qdf_print(" Send single EP%d buffer size:0x%x, total:0x%x.\n", + qdf_print(" Send single EP%d buffer size:0x%x, total:0x%x.", pEndpoint->Id, pEndpoint->TxCreditSize, HTC_HDR_LENGTH + pPacket->ActualLength); @@ -1755,7 +1755,7 @@ QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, HTC_HDR_LENGTH + pPacket->ActualLength, netbuf, data_attr); #if DEBUG_BUNDLE - qdf_print(" Send single EP%d buffer size:0x%x, total:0x%x.\n", + qdf_print(" Send single EP%d buffer size:0x%x, total:0x%x.", pEndpoint->Id, pEndpoint->TxCreditSize, HTC_HDR_LENGTH + pPacket->ActualLength); diff --git a/htc/htc_services.c b/htc/htc_services.c index 3ec50d4cd0ed..6ee2ed842958 100644 --- a/htc/htc_services.c +++ b/htc/htc_services.c @@ -341,7 +341,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle, if (maxMsgSize % target->TargetCreditSize) pEndpoint->TxCreditsPerMaxMsg++; #if DEBUG_CREDIT - qdf_print(" Endpoint%d initial credit:%d, size:%d.\n", + qdf_print(" Endpoint%d initial credit:%d, size:%d.", pEndpoint->Id, pEndpoint->TxCredits, pEndpoint->TxCreditSize); #endif @@ -424,7 +424,7 @@ void htc_set_async_ep(HTC_HANDLE HTCHandle, HTC_ENDPOINT *pEndpoint = &target->endpoint[htc_ep_id]; pEndpoint->async_update = value; - qdf_print("%s: htc_handle %pK, ep %d, value %d\n", __func__, - HTCHandle, htc_ep_id, value); + qdf_print("%s: htc_handle %pK, ep %d, value %d", __func__, + HTCHandle, htc_ep_id, value); }