]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: fix 'no effect' errors
authorSebastien Buisson <sbuisson@ddn.com>
Tue, 5 Apr 2016 01:37:02 +0000 (21:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 03:47:10 +0000 (20:47 -0700)
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.

Remove useless cast.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3907
Reviewed-on: http://review.whamcloud.com/7166
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr.c
drivers/staging/lustre/lustre/lmv/lmv_obd.c

index 37bc13e351b7f4398f7ed7907858df8af5c35b09..9f6fcfe8b988da42b3cca040f665432f3fb12f3c 100644 (file)
@@ -424,8 +424,7 @@ getxattr_nocache:
        if (rce && 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)) {
                        rc = PTR_ERR(acl);
                        goto out;
index a3967771ae07a3d2905fab85b2274e949e9c5efb..2f6457f5e98c17511c634ee9730e703a490139f3 100644 (file)
@@ -926,7 +926,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];