From: Youssef Samir <[email protected]>

If msg_xfer() is called and the channel ring does not have enough room
to accommodate the whole message, the function sleeps and tries again.
It uses retry_count to keep track of the number of retrials done. This
variable is not used after the space check succeeds. So, remove the
retry_count = 0 statement used later in the function.

Signed-off-by: Youssef Samir <[email protected]>
Signed-off-by: Youssef Samir <[email protected]>
---
 drivers/accel/qaic/qaic_control.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/accel/qaic/qaic_control.c 
b/drivers/accel/qaic/qaic_control.c
index d8bdab69f800..5aa49e0e1869 100644
--- a/drivers/accel/qaic/qaic_control.c
+++ b/drivers/accel/qaic/qaic_control.c
@@ -1079,7 +1079,6 @@ static void *msg_xfer(struct qaic_device *qdev, struct 
wrapper_list *wrappers, u
 
        list_for_each_entry(w, &wrappers->list, list) {
                kref_get(&w->ref_count);
-               retry_count = 0;
                ret = mhi_queue_buf(qdev->cntl_ch, DMA_TO_DEVICE, &w->msg, 
w->len,
                                    list_is_last(&w->list, &wrappers->list) ? 
MHI_EOT : MHI_CHAIN);
                if (ret) {
-- 
2.43.0

Reply via email to