Messages in this thread Patch in this message | | | From | Peng Tao <> | Subject | [PATCH 36/39] staging/lustre/build: fix 'no effect' errors | Date | Fri, 15 Nov 2013 00:32:59 +0800 |
| |
From: Sebastien Buisson <sebastien.buisson@bull.net>
Fix 'no effect' issues found by Coverity version 6.5.1: Unsigned compared against 0 (NO_EFFECT) This greater-than-or-equal-to-zero comparison of an unsigned value is always true.
Lustre-change: http://review.whamcloud.com/7166 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3097 Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> --- drivers/staging/lustre/lustre/llite/xattr.c | 5 ++--- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 1 - 4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index b6cb0db..b1384ff 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -410,11 +410,10 @@ getxattr_nocache: } #ifdef CONFIG_FS_POSIX_ACL - if (rce && rce->rce_ops == RMT_LSETFACL) { + if (rce != NULL && rce->rce_ops == RMT_LSETFACL) { ext_acl_xattr_header *acl; - acl = lustre_posix_acl_xattr_2ext((posix_acl_xattr_header *)buffer, - rc); + acl = lustre_posix_acl_xattr_2ext(buffer, rc); if (IS_ERR(acl)) GOTO(out, rc = PTR_ERR(acl)); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 2587f1a..d3e7d6b 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -947,7 +947,7 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp, struct obd_quotactl *oqctl; if (qctl->qc_valid == QC_MDTIDX) { - if (qctl->qc_idx < 0 || count <= qctl->qc_idx) + if (count <= qctl->qc_idx) return -EINVAL; tgt = lmv->tgts[qctl->qc_idx]; diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 4783450..b35a654 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -1982,7 +1982,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, struct obd_quotactl *oqctl; if (qctl->qc_valid == QC_OSTIDX) { - if (qctl->qc_idx < 0 || count <= qctl->qc_idx) + if (count <= qctl->qc_idx) return -EINVAL; tgt = lov->lov_tgts[qctl->qc_idx]; diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index 316103a..b9a3e6f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -451,7 +451,6 @@ out: static inline void enc_pools_wakeup(void) { LASSERT(spin_is_locked(&page_pools.epp_lock)); - LASSERT(page_pools.epp_waitqlen >= 0); if (unlikely(page_pools.epp_waitqlen)) { LASSERT(waitqueue_active(&page_pools.epp_waitq)); -- 1.7.9.5
| |