Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297173

[PATCH v3 6/6] drivers/staging/lustre: Nuke another unsigned >= 0 assert

From Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Newsgroups linux.kernel
Subject [PATCH v3 6/6] drivers/staging/lustre: Nuke another unsigned >= 0 assert
Date 2015-12-23 01:40 +0100
Message-ID <qIFDc-2Co-3@gated-at.bofh.it> (permalink)
References <qIFDb-2Co-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Clean up another case of the compiler remininding the programmer they
are an idiot:

drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c:308:34: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  LASSERT(page_pools.epp_waitqlen >= 0);

Just lose the assert, and save a page of compiler spew.

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
---
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
index cd8a9987f7ac..1f326673f089 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
@@ -304,7 +304,6 @@ static unsigned long enc_pools_cleanup(struct page ***pools, int npools)
 static inline void enc_pools_wakeup(void)
 {
 	assert_spin_locked(&page_pools.epp_lock);
-	LASSERT(page_pools.epp_waitqlen >= 0);
 
 	if (unlikely(page_pools.epp_waitqlen)) {
 		LASSERT(waitqueue_active(&page_pools.epp_waitq));
-- 
2.6.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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/6] Patch series to make lustre safe(r) for W=1 compiles Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 6/6] drivers/staging/lustre: Nuke another unsigned >= 0 assert Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 5/6] drivers/staging/lustre: Nuke an unsigned >= 0 assert Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 2/6] drivers/staging/lustre: Fix set-but-unused whinge. Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 3/6] drivers/staging/lustre: Clean up another C warnining: set but not used Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 4/6] drivers/staging/lustre: Fix another C compiler whine: set but not used Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100
  [PATCH v3 1/6] drivers/staging/lustre: Silence warning about 'inline' Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-23 01:40 +0100

csiph-web