From: Youssef Samir Date: Tue, 7 Oct 2025 16:11:48 +0000 (+0200) Subject: accel/qaic: Remove redundant retry_count = 0 statement X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=754fcd22d18026fcf0fec0e07ab095f84cd941fd;p=thirdparty%2Fkernel%2Flinux.git accel/qaic: Remove redundant retry_count = 0 statement 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 Signed-off-by: Youssef Samir Reviewed-by: Jeff Hugo Reviewed-by: Carl Vanderlip Signed-off-by: Jeff Hugo Link: https://lore.kernel.org/r/20251007161148.422744-1-youssef.abdulrahman@oss.qualcomm.com --- diff --git a/drivers/accel/qaic/qaic_control.c b/drivers/accel/qaic/qaic_control.c index e47a48de78766..a51a808aa2e80 100644 --- a/drivers/accel/qaic/qaic_control.c +++ b/drivers/accel/qaic/qaic_control.c @@ -1080,7 +1080,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) {