From: Gustavo A. R. Silva Date: Thu, 11 May 2017 04:27:40 +0000 (-0500) Subject: staging: lustre: ptlrpc: remove unnecessary code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f514c35c04754337fc519e2ac10e518d9a0dcdd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: lustre: ptlrpc: remove unnecessary code 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c index 8177e1a31ca9..5810bbab6585 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c @@ -1761,7 +1761,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; }