No need to check for rc since it is never assigned after declaration
and sub-calls do not return error codes.
Test-Parameters: trivial
Change-Id: I040a45e8a779b11840c8c883fd4d5d87ee7f0fed
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: http://review.whamcloud.com/20587
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
struct lprocfs_counter_header *hdr;
struct lprocfs_counter ctr;
int idx = *(loff_t *)v;
struct lprocfs_counter_header *hdr;
struct lprocfs_counter ctr;
int idx = *(loff_t *)v;
if (idx == 0) {
struct timeval now;
if (idx == 0) {
struct timeval now;
do_gettimeofday(&now);
seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
"snapshot_time", now.tv_sec, now.tv_usec);
do_gettimeofday(&now);
seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
"snapshot_time", now.tv_sec, now.tv_usec);
- if (rc < 0)
- return rc;
}
hdr = &stats->ls_cnt_header[idx];
lprocfs_stats_collect(stats, idx, &ctr);
if (ctr.lc_count == 0)
}
hdr = &stats->ls_cnt_header[idx];
lprocfs_stats_collect(stats, idx, &ctr);
if (ctr.lc_count == 0)
seq_printf(p, "%-25s "LPD64" samples [%s]", hdr->lc_name,
ctr.lc_count, hdr->lc_units);
seq_printf(p, "%-25s "LPD64" samples [%s]", hdr->lc_name,
ctr.lc_count, hdr->lc_units);
- if (rc < 0)
- goto out;
if ((hdr->lc_config & LPROCFS_CNTR_AVGMINMAX) && ctr.lc_count > 0) {
seq_printf(p, " "LPD64" "LPD64" "LPD64,
ctr.lc_min, ctr.lc_max, ctr.lc_sum);
if ((hdr->lc_config & LPROCFS_CNTR_AVGMINMAX) && ctr.lc_count > 0) {
seq_printf(p, " "LPD64" "LPD64" "LPD64,
ctr.lc_min, ctr.lc_max, ctr.lc_sum);
- if (rc < 0)
- goto out;
if (hdr->lc_config & LPROCFS_CNTR_STDDEV)
seq_printf(p, " "LPD64, ctr.lc_sumsquare);
if (hdr->lc_config & LPROCFS_CNTR_STDDEV)
seq_printf(p, " "LPD64, ctr.lc_sumsquare);
- if (rc < 0)
- goto out;
-out:
- return (rc < 0) ? rc : 0;
}
static const struct seq_operations lprocfs_stats_seq_sops = {
}
static const struct seq_operations lprocfs_stats_seq_sops = {