Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757583AbdIIQX3 (ORCPT ); Sat, 9 Sep 2017 12:23:29 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33648 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753519AbdIIQX1 (ORCPT ); Sat, 9 Sep 2017 12:23:27 -0400 X-Google-Smtp-Source: ADKCNb6JhtXTLLXdhkbmKhFZBZn8ASC1LFIQ39v9CJQAsIaCxBQgFjDcazsUSIN486KigZwGXF1GxQ== From: Christos Gkekas To: David Howells , linux-cachefs@redhat.com, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] fs/cachefiles: Remove unnecessary comparisons in bind.c Date: Sat, 9 Sep 2017 17:23:23 +0100 Message-Id: <1504974203-24921-1-git-send-email-chris.gekas@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 Content-Length: 1052 Lines: 30 cache->fstop_percent and cache->bstop_percent are unsigned so they are always >= 0. There is no point in asserting this. Signed-off-by: Christos Gkekas --- fs/cachefiles/bind.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c index d9f0010..105ac53 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c @@ -40,13 +40,11 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args) args); /* start by checking things over */ - ASSERT(cache->fstop_percent >= 0 && - cache->fstop_percent < cache->fcull_percent && + ASSERT(cache->fstop_percent < cache->fcull_percent && cache->fcull_percent < cache->frun_percent && cache->frun_percent < 100); - ASSERT(cache->bstop_percent >= 0 && - cache->bstop_percent < cache->bcull_percent && + ASSERT(cache->bstop_percent < cache->bcull_percent && cache->bcull_percent < cache->brun_percent && cache->brun_percent < 100); -- 2.7.4