From: Sebastien Buisson <sebastien.buis...@bull.net>

Fix 'code maintainability' issues found by Coverity version 6.5.1:
Unused pointer value (UNUSED_VALUE)
Pointer returned by function is never used.
Missing varargs init or cleanup (VARARGS)
va_end was not called for variable.

Signed-off-by: Sebastien Buisson <sebastien.buis...@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3107
Lustre-change: http://review.whamcloud.com/5944
Reviewed-by: Dmitry Eremin <dmitry.ere...@intel.com>
Reviewed-by: John Hammond <johnlockwoodhamm...@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dil...@intel.com>
Signed-off-by: Peng Tao <tao.p...@emc.com>
Signed-off-by: Andreas Dilger <andreas.dil...@intel.com>
---
 .../lustre/lustre/obdclass/lprocfs_jobstats.c      |    2 --
 .../staging/lustre/lustre/ptlrpc/pack_generic.c    |    1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c 
b/drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
index e2d57fe..7f6072c 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
@@ -366,7 +366,6 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, 
void *v)
        struct job_stat                 *job = v;
        struct lprocfs_stats            *s;
        struct lprocfs_counter          ret;
-       struct lprocfs_counter          *cntr;
        struct lprocfs_counter_header   *cntr_header;
        int                             i;
 
@@ -380,7 +379,6 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, 
void *v)
 
        s = job->js_stats;
        for (i = 0; i < s->ls_num; i++) {
-               cntr = lprocfs_stats_counter_get(s, 0, i);
                cntr_header = &s->ls_cnt_header[i];
                lprocfs_stats_collect(s, i, &ret);
 
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c 
b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index be246d4..ffff648 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -2462,6 +2462,7 @@ void _debug_req(struct ptlrpc_request *req,
                           rep_ok ? lustre_msg_get_flags(req->rq_repmsg) : -1,
                           req->rq_status,
                           rep_ok ? lustre_msg_get_status(req->rq_repmsg) : -1);
+       va_end(args);
 }
 EXPORT_SYMBOL(_debug_req);
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to