Commit dded0317 authored by Douglas Anderson's avatar Douglas Anderson Committed by Bjorn Andersson

soc: qcom: rpmh-rsc: Don't double-check rpmh payload

The calls rpmh_rsc_write_ctrl_data() and rpmh_rsc_send_data() are only
ever called from rpmh.c.  We know that rpmh.c already error checked
the message.  There's no reason to do it again in rpmh-rsc.
Suggested-by: default avatarMaulik Shah <mkshah@codeaurora.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarMaulik Shah <mkshah@codeaurora.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Tested-by: default avatarMaulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/20200413100321.v4.8.I8e187cdfb7a31f5bb7724f1f937f2862ee464a35@changeidSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent ff304ea3
...@@ -634,7 +634,7 @@ static int tcs_write(struct rsc_drv *drv, const struct tcs_request *msg) ...@@ -634,7 +634,7 @@ static int tcs_write(struct rsc_drv *drv, const struct tcs_request *msg)
} }
/** /**
* rpmh_rsc_send_data() - Validate the incoming message + write to TCS block. * rpmh_rsc_send_data() - Write / trigger active-only message.
* @drv: The controller. * @drv: The controller.
* @msg: The data to be sent. * @msg: The data to be sent.
* *
...@@ -659,12 +659,6 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg) ...@@ -659,12 +659,6 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg)
{ {
int ret; int ret;
if (!msg || !msg->cmds || !msg->num_cmds ||
msg->num_cmds > MAX_RPMH_PAYLOAD) {
WARN_ON(1);
return -EINVAL;
}
do { do {
ret = tcs_write(drv, msg); ret = tcs_write(drv, msg);
if (ret == -EBUSY) { if (ret == -EBUSY) {
...@@ -735,16 +729,6 @@ int rpmh_rsc_write_ctrl_data(struct rsc_drv *drv, const struct tcs_request *msg) ...@@ -735,16 +729,6 @@ int rpmh_rsc_write_ctrl_data(struct rsc_drv *drv, const struct tcs_request *msg)
unsigned long flags; unsigned long flags;
int ret; int ret;
if (!msg || !msg->cmds || !msg->num_cmds ||
msg->num_cmds > MAX_RPMH_PAYLOAD) {
pr_err("Payload error\n");
return -EINVAL;
}
/* Data sent to this API will not be sent immediately */
if (msg->state == RPMH_ACTIVE_ONLY_STATE)
return -EINVAL;
tcs = get_tcs_for_msg(drv, msg); tcs = get_tcs_for_msg(drv, msg);
if (IS_ERR(tcs)) if (IS_ERR(tcs))
return PTR_ERR(tcs); return PTR_ERR(tcs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment