Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbcCGR0c (ORCPT ); Mon, 7 Mar 2016 12:26:32 -0500 Received: from mail.kernel.org ([198.145.29.136]:40689 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbcCGR0X (ORCPT ); Mon, 7 Mar 2016 12:26:23 -0500 Date: Mon, 7 Mar 2016 09:26:19 -0800 From: Shaohua Li To: Eric Engestrom Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] md/bitmap: remove redundant check Message-ID: <20160307172619.GA48300@kernel.org> References: <1457352065-28994-1-git-send-email-eric.engestrom@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457352065-28994-1-git-send-email-eric.engestrom@imgtec.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 25 On Mon, Mar 07, 2016 at 12:01:05PM +0000, Eric Engestrom wrote: > 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; > } Applied, thanks!