This ti_sci_do_xfer() function already prints out the reason for the
failure, and the caller of each of these functions should also notify
the user of the failed task. Remove this extra level of error message.
Signed-off-by: Andrew Davis
---
drivers/firmware/ti_sci.c | 132 ++
1 file changed, 34 insertions(+), 98 deletions(-)
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 0b6ba35b59..85db3f05fd 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -287,10 +287,8 @@ static int ti_sci_cmd_get_revision(struct ti_sci_handle
*handle)
}
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox communication fail %d\n", ret);
+ if (ret)
return ret;
- }
rev_info = (struct ti_sci_msg_resp_version *)xfer->tx_message.buf;
@@ -356,10 +354,8 @@ static int cmd_set_board_config_using_msg(const struct
ti_sci_handle *handle,
req.boardcfg_size = size;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
@@ -516,10 +512,8 @@ static int ti_sci_set_device_state(const struct
ti_sci_handle *handle,
req.state = state;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
@@ -572,7 +566,7 @@ static int ti_sci_set_device_state_no_wait(const struct
ti_sci_handle *handle,
ret = ti_sci_do_xfer(info, xfer);
if (ret)
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ return ret;
return ret;
}
@@ -619,10 +613,8 @@ static int ti_sci_get_device_state(const struct
ti_sci_handle *handle,
req.id = id;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_resp_get_device_state *)xfer->tx_message.buf;
if (!ti_sci_is_response_ack(resp))
@@ -908,10 +900,8 @@ static int ti_sci_cmd_set_device_resets(const struct
ti_sci_handle *handle,
req.resets = reset_state;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
@@ -979,10 +969,8 @@ static int ti_sci_set_clock_state(const struct
ti_sci_handle *handle,
req.request_state = state;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
@@ -1036,10 +1024,8 @@ static int ti_sci_cmd_get_clock_state(const struct
ti_sci_handle *handle,
req.clk_id = clk_id;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_resp_get_clock_state *)xfer->tx_message.buf;
@@ -1253,10 +1239,8 @@ static int ti_sci_cmd_clk_set_parent(const struct
ti_sci_handle *handle,
req.parent_id = parent_id;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_hdr *)xfer->tx_message.buf;
@@ -1305,10 +1289,8 @@ static int ti_sci_cmd_clk_get_parent(const struct
ti_sci_handle *handle,
req.clk_id = clk_id;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_resp_get_clock_parent *)xfer->tx_message.buf;
@@ -1360,10 +1342,8 @@ static int ti_sci_cmd_clk_get_num_parents(const struct
ti_sci_handle *handle,
req.clk_id = clk_id;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+ if (ret)
return ret;
- }
resp = (struct ti_sci_msg_resp_get_clock_num_parents *)
xfer->tx_message.buf;
@@ -1428,10 +1408,8 @@ static int ti_sci_cmd_clk_get_match_freq(const struct
ti_sci_handle *handle,
req.max_freq_hz = max_freq;
ret = ti_sci_do_xfer(info, xfer);
- if (ret) {
- dev_err(info->dev, "Mbox send fail %d\n", ret);
+