struct lprocfs_stats *stats = p->private;
struct lprocfs_counter *cntr = v;
struct lprocfs_counter t, ret = { .lc_min = LC_MIN_INIT };
- int i, idx, rc;
+ int i, idx, rc = 0;
unsigned int num_cpu;
if (cntr == &(stats->ls_percpu[0])->lp_cntr[0]) {
ret.lc_sumsquare += t.lc_sumsquare;
}
+ if (ret.lc_count == 0)
+ goto out;
+
rc = seq_printf(p, "%-25s "LPD64" samples [%s]", cntr->lc_name,
ret.lc_count, cntr->lc_units);
if (rc < 0)
!exp->exp_obd->obd_nid_stats_hash)
RETURN(-EINVAL);
- /* not test against zero because eric say:
- * You may only test nid against another nid, or LNET_NID_ANY.
+ /* not test against zero because eric say:
+ * You may only test nid against another nid, or LNET_NID_ANY.
* Anything else is nonsense.*/
if (!nid || *nid == LNET_NID_ANY)
RETURN(0);