Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753418AbbKBKHI (ORCPT ); Mon, 2 Nov 2015 05:07:08 -0500 Received: from forward-corp1o.mail.yandex.net ([37.140.190.172]:50284 "EHLO forward-corp1o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbbKBKHF (ORCPT ); Mon, 2 Nov 2015 05:07:05 -0500 Authentication-Results: smtpcorp1o.mail.yandex.net; dkim=pass header.i=@yandex-team.ru From: Roman Gushchin To: linux-kernel@vger.kernel.org Cc: Roman Gushchin , Neil Brown , linux-raid@vger.kernel.org Subject: [PATCH] md/raid5: remove redundant check in stripe_add_to_batch_list() Date: Mon, 2 Nov 2015 13:06:53 +0300 Message-Id: <1446458813-6502-1-git-send-email-klamm@yandex-team.ru> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1006 Lines: 31 The stripe_add_to_batch_list() function is called only if stripe_can_batch() returned true, so there is no need for double check. Signed-off-by: Roman Gushchin Cc: Neil Brown Cc: linux-raid@vger.kernel.org --- drivers/md/raid5.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 45933c1..f829ebc 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -768,8 +768,6 @@ static void stripe_add_to_batch_list(struct r5conf *conf, struct stripe_head *sh int hash; int dd_idx; - if (!stripe_can_batch(sh)) - return; /* Don't cross chunks, so stripe pd_idx/qd_idx is the same */ tmp_sec = sh->sector; if (!sector_div(tmp_sec, conf->chunk_sectors)) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/