Skip to content

Commit

Permalink
FIXME: msm: ipa: Avoid overusing BUG()
Browse files Browse the repository at this point in the history
Both ipa_uc_send_cmd() of v2 and ipa3_uc_send_cmd_64b_param() of v3 already
have their own BUG() handler before returning -EFAULT, making these BUG() are
kinda pointless.

Issue tracker: KudProject/kernel_xiaomi_msm8953-4.9#1
Signed-off-by: Albert I <kras@raphielgang.org>
  • Loading branch information
krasCGQ authored and zeta96 committed Mar 27, 2023
1 parent 0d798dc commit c9b3e4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 3 additions & 6 deletions drivers/platform/msm/ipa/ipa_v2/ipa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,6 @@ int ipa_q6_pre_shutdown_cleanup(void)
int ipa_q6_post_shutdown_cleanup(void)
{
int client_idx;
int res;

/*
* Do not delay Q6 pipes here. This may result in IPA reading a
Expand All @@ -2219,11 +2218,9 @@ int ipa_q6_post_shutdown_cleanup(void)
if (IPA_CLIENT_IS_Q6_NON_ZIP_CONS(client_idx) ||
IPA_CLIENT_IS_Q6_ZIP_CONS(client_idx) ||
IPA_CLIENT_IS_Q6_NON_ZIP_PROD(client_idx) ||
IPA_CLIENT_IS_Q6_ZIP_PROD(client_idx)) {
res = ipa_uc_reset_pipe(client_idx);
if (res)
BUG();
}
IPA_CLIENT_IS_Q6_ZIP_PROD(client_idx))
ipa_uc_reset_pipe(client_idx);

return 0;
}

Expand Down
4 changes: 1 addition & 3 deletions drivers/platform/msm/ipa/ipa_v3/ipa_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,8 @@ void ipa3_uc_rg10_write_reg(enum ipahal_reg_name reg, u32 n, u32 val)
paddr, val);
ret = ipa3_uc_send_cmd_64b_param(paddr, val,
IPA_CPU_2_HW_CMD_REG_WRITE, 0, true, 0);
if (ret) {
if (ret)
IPAERR("failed to send cmd to uC for reg write\n");
BUG();
}
}

/**
Expand Down

0 comments on commit c9b3e4c

Please sign in to comment.