> > +void print_stat_spark(FILE *f, struct stats *stat)
> > +{
> > +   int n = stat->n, len;
> > +
> > +   if (n <= 1)
> > +           return;
> > +   len = n;
> 
> It seems the 'n' is not needed at all - just use 'len'.

This would break ".." for n == NUM_SPARK_VALS
> 
> 
> > +   if (len > NUM_SPARK_VALS)
> > +           len = NUM_SPARK_VALS;
> > +   if (all_the_same(stat->svals, len))
> > +           return;
> 
> Why does it skip printing if all values are same?  I think you wanted to
> skip the "all zero" (uncounted) case, right?

A spark line is meaningless if all values are the same.

-Andi
--
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