]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
accel/qaic: Remove redundant retry_count = 0 statement
authorYoussef Samir <quic_yabdulra@quicinc.com>
Tue, 7 Oct 2025 16:11:48 +0000 (18:11 +0200)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Tue, 14 Oct 2025 15:10:10 +0000 (09:10 -0600)
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 <quic_yabdulra@quicinc.com>
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251007161148.422744-1-youssef.abdulrahman@oss.qualcomm.com
drivers/accel/qaic/qaic_control.c

index e47a48de7876688f155f808cd01ca0dafd8e427d..a51a808aa2e80ba21fbfad5f762f59e5a3e43f04 100644 (file)
@@ -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) {