if (percpu_cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) {
percpu_cntr->lc_sum += amount;
if (percpu_cntr->lc_config & LPROCFS_CNTR_STDDEV)
- percpu_cntr->lc_sumsquare += (__u64)amount * amount;
+ percpu_cntr->lc_sumsquare += (__s64)amount * amount;
if (amount < percpu_cntr->lc_min)
percpu_cntr->lc_min = amount;
if (amount > percpu_cntr->lc_max)
atomic_inc(&percpu_cntr->lc_cntl.la_entry);
percpu_cntr->lc_count = 0;
percpu_cntr->lc_sum = 0;
- percpu_cntr->lc_min = ~(__u64)0;
+ percpu_cntr->lc_min = LC_MIN_INIT;
percpu_cntr->lc_max = 0;
percpu_cntr->lc_sumsquare = 0;
atomic_inc(&percpu_cntr->lc_cntl.la_exit);
{
struct lprocfs_stats *stats = p->private;
struct lprocfs_counter *cntr = v;
- struct lprocfs_counter t, ret = { .lc_min = ~(__u64)0 };
+ struct lprocfs_counter t, ret = { .lc_min = LC_MIN_INIT };
int i, idx, rc;
unsigned int num_cpu;
ret.lc_sumsquare += t.lc_sumsquare;
}
- rc = seq_printf(p, "%-25s "LPU64" samples [%s]", cntr->lc_name,
+ rc = seq_printf(p, "%-25s "LPD64" samples [%s]", cntr->lc_name,
ret.lc_count, cntr->lc_units);
if (rc < 0)
goto out;
if ((cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) && (ret.lc_count > 0)) {
- rc = seq_printf(p, " "LPU64" "LPU64" "LPU64,
+ rc = seq_printf(p, " "LPD64" "LPD64" "LPD64,
ret.lc_min, ret.lc_max, ret.lc_sum);
if (rc < 0)
goto out;
if (cntr->lc_config & LPROCFS_CNTR_STDDEV)
- rc = seq_printf(p, " "LPU64, ret.lc_sumsquare);
+ rc = seq_printf(p, " "LPD64, ret.lc_sumsquare);
if (rc < 0)
goto out;
}
c->lc_config = conf;
c->lc_count = 0;
c->lc_sum = 0;
- c->lc_min = ~(__u64)0;
+ c->lc_min = LC_MIN_INIT;
c->lc_max = 0;
c->lc_name = name;
c->lc_units = units;