Commit ac8723e8 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Mathieu Poirier

remoteproc/mtk_scp: Remove timeout variable from scp_ipi_send()

That variable was used twice, but now it's just used once to store
msecs_to_jiffies(wait), fed to wait_event_timeout(): we might as
well remove it for the sake of cleaning up.

This brings no functional changes.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230104115341.320951-3-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent fad151d5
...@@ -160,7 +160,6 @@ int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, ...@@ -160,7 +160,6 @@ int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
unsigned int wait) unsigned int wait)
{ {
struct mtk_share_obj __iomem *send_obj = scp->send_buf; struct mtk_share_obj __iomem *send_obj = scp->send_buf;
unsigned long timeout;
u32 val; u32 val;
int ret; int ret;
...@@ -197,10 +196,9 @@ int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, ...@@ -197,10 +196,9 @@ int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
if (wait) { if (wait) {
/* wait for SCP's ACK */ /* wait for SCP's ACK */
timeout = msecs_to_jiffies(wait);
ret = wait_event_timeout(scp->ack_wq, ret = wait_event_timeout(scp->ack_wq,
scp->ipi_id_ack[id], scp->ipi_id_ack[id],
timeout); msecs_to_jiffies(wait));
scp->ipi_id_ack[id] = false; scp->ipi_id_ack[id] = false;
if (WARN(!ret, "scp ipi %d ack time out !", id)) if (WARN(!ret, "scp ipi %d ack time out !", id))
ret = -EIO; ret = -EIO;
......
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