Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbcCGMCj (ORCPT ); Mon, 7 Mar 2016 07:02:39 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:21528 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbcCGMCg (ORCPT ); Mon, 7 Mar 2016 07:02:36 -0500 From: Eric Engestrom To: Shaohua Li , , CC: Eric Engestrom Subject: [PATCH] md/bitmap: remove redundant check Date: Mon, 7 Mar 2016 12:01:05 +0000 Message-ID: <1457352065-28994-1-git-send-email-eric.engestrom@imgtec.com> X-Mailer: git-send-email 2.7.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.60.4.28] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 799 Lines: 24 daemon_sleep is an unsigned, so testing if it's 0 or less than 1 does the same thing. Signed-off-by: Eric Engestrom --- drivers/md/bitmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index d80cce4..bbe7b64 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -510,8 +510,7 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap) sb->chunksize = cpu_to_le32(chunksize); daemon_sleep = bitmap->mddev->bitmap_info.daemon_sleep; - if (!daemon_sleep || - (daemon_sleep < 1) || (daemon_sleep > MAX_SCHEDULE_TIMEOUT)) { + if (!daemon_sleep || (daemon_sleep > MAX_SCHEDULE_TIMEOUT)) { printk(KERN_INFO "Choosing daemon_sleep default (5 sec)\n"); daemon_sleep = 5 * HZ; } -- 2.7.1