linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/bitmap: remove redundant check
@ 2016-03-07 12:01 Eric Engestrom
  2016-03-07 17:26 ` Shaohua Li
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Engestrom @ 2016-03-07 12:01 UTC (permalink / raw)
  To: Shaohua Li, linux-raid, linux-kernel; +Cc: Eric Engestrom

daemon_sleep is an unsigned, so testing if it's 0 or less than 1 does
the same thing.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] md/bitmap: remove redundant check
  2016-03-07 12:01 [PATCH] md/bitmap: remove redundant check Eric Engestrom
@ 2016-03-07 17:26 ` Shaohua Li
  0 siblings, 0 replies; 2+ messages in thread
From: Shaohua Li @ 2016-03-07 17:26 UTC (permalink / raw)
  To: Eric Engestrom; +Cc: linux-raid, linux-kernel

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 <eric.engestrom@imgtec.com>
> ---
>  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!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-07 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 12:01 [PATCH] md/bitmap: remove redundant check Eric Engestrom
2016-03-07 17:26 ` Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).