From: Vincent Fu Date: Mon, 15 Oct 2018 14:44:47 +0000 (-0400) Subject: rate-submit: remove code that can never be executed X-Git-Tag: fio-3.12~19^2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=8db390cd9131caec46d252dee39a2a511735283c;hp=3d6a6f045d24b281ff94ea71c44a637f6d8f0f9e rate-submit: remove code that can never be executed The do-while loop above can only be exited when ret != FIO_Q_BUSY. So the if (ret == FIO_Q_BUSY) branch will never be taken. --- diff --git a/rate-submit.c b/rate-submit.c index 8ecd285c..68ad755d 100644 --- a/rate-submit.c +++ b/rate-submit.c @@ -83,10 +83,6 @@ static int io_workqueue_fn(struct submit_worker *sw, ret = io_u_queued_complete(td, min_evts); if (ret > 0) td->cur_depth -= ret; - } else if (ret == FIO_Q_BUSY) { - ret = io_u_queued_complete(td, td->cur_depth); - if (ret > 0) - td->cur_depth -= ret; } return 0;