* [PATCH] staging: lustre: ptlrpc: remove unnecessary code
@ 2017-05-11 4:27 Gustavo A. R. Silva
0 siblings, 0 replies; only message in thread
From: Gustavo A. R. Silva @ 2017-05-11 4:27 UTC (permalink / raw)
To: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman
Cc: lustre-devel, devel, linux-kernel, Gustavo A. R. Silva
offset is an unsigned variable and, greater-than-or-equal-to-zero
comparison of an unsigned variable is always true.
Addresses-Coverity-ID: 1373919
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 356d735..ff77b52 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -1762,7 +1762,7 @@ static u32 __req_capsule_offset(const struct req_capsule *pill,
field->rmf_name, offset, loc);
offset--;
- LASSERT(0 <= offset && offset < REQ_MAX_FIELD_NR);
+ LASSERT(offset < REQ_MAX_FIELD_NR);
return offset;
}
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-11 4:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 4:27 [PATCH] staging: lustre: ptlrpc: remove unnecessary code Gustavo A. R. Silva
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.