From 697c23a960f7ed767273bfb379d396c8f77e35fa Mon Sep 17 00:00:00 2001 From: Skylar Chang Date: Wed, 25 Mar 2020 21:40:05 -0700 Subject: [PATCH] ipa3: mpm: remove WARN_ON for security concern Removing the WARN_ON on dmesg due to security concern to expose device address, change to use IPA_MPM_ERR in ipc logs for debugging reference. Change-Id: I73d5ba9ad43cb43c7eb89801e1131482310b8464 Signed-off-by: Skylar Chang Signed-off-by: UtsavBalar1231 --- drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c b/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c index d1a9ab8bf8a5..c2422e8b2a52 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c @@ -642,7 +642,6 @@ static void ipa_mpm_smmu_unmap(dma_addr_t carved_iova, int sz, int dir, if (carved_iova <= 0) { IPA_MPM_ERR("carved_iova is zero/negative\n"); - WARN_ON(1); return; } @@ -1444,9 +1443,8 @@ static int ipa_mpm_vote_unvote_pcie_clk(enum ipa_mpm_clk_vote_type vote, if ((atomic_read( &ipa_mpm_ctx->md[probe_id].clk_cnt.pcie_clk_cnt) == 0)) { - IPA_MPM_DBG("probe_id %d PCIE clock already devoted\n", + IPA_MPM_ERR("probe_id %d PCIE clock already devoted\n", probe_id); - WARN_ON(1); return 0; } mhi_device_put(ipa_mpm_ctx->md[probe_id].mhi_dev, MHI_VOTE_BUS); @@ -1480,9 +1478,8 @@ static void ipa_mpm_vote_unvote_ipa_clk(enum ipa_mpm_clk_vote_type vote, if ((atomic_read (&ipa_mpm_ctx->md[probe_id].clk_cnt.ipa_clk_cnt) == 0)) { - IPA_MPM_DBG("probe_id %d IPA clock count < 0\n", + IPA_MPM_ERR("probe_id %d IPA clock count < 0\n", probe_id); - WARN_ON(1); return; } IPA_ACTIVE_CLIENTS_DEC_SPECIAL(ipa_mpm_mhip_chan_str[probe_id]); @@ -2037,7 +2034,6 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev, ret = mhi_prepare_for_transfer(ipa_mpm_ctx->md[probe_id].mhi_dev); if (ret) { IPA_MPM_ERR("mhi_prepare_for_transfer failed %d\n", ret); - WARN_ON(1); /* * WA to handle prepare_for_tx failures. * Though prepare for transfer fails, indicate success