From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755227AbdLTQY3 (ORCPT ); Wed, 20 Dec 2017 11:24:29 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43674 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbdLTQY1 (ORCPT ); Wed, 20 Dec 2017 11:24:27 -0500 X-Google-Smtp-Source: ACJfBovXcsaqTizbw7ANhdE+PDxKgF+IJUvJK1vab/U4mo+EhjghiTXUZVfvbqd9xVodH1Ya0YnIMQ== From: Khan M Rashedun-Naby To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Khan M Rashedun-Naby Subject: [PATCH] Block: blk-flush: removed an unnecessary else statement Date: Wed, 20 Dec 2017 22:23:55 +0600 Message-Id: <1513787035-18973-1-git-send-email-naby88@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As both of the if and else statement block is returning something then there is no need of the else statement. Thus this else statement has been removed. Signed-off-by: Khan M Rashedun-Naby --- block/blk-flush.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/blk-flush.c b/block/blk-flush.c index f171706..b629014 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -137,13 +137,14 @@ static bool blk_flush_queue_rq(struct request *rq, bool add_front) if (rq->q->mq_ops) { blk_mq_add_to_requeue_list(rq, add_front, true); return false; - } else { - if (add_front) - list_add(&rq->queuelist, &rq->q->queue_head); - else - list_add_tail(&rq->queuelist, &rq->q->queue_head); - return true; } + + if (add_front) + list_add(&rq->queuelist, &rq->q->queue_head); + else + list_add_tail(&rq->queuelist, &rq->q->queue_head); + + return true; } /** -- 2.7.4