hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/lib/dim/dim.c
....@@ -54,7 +54,7 @@
5454 }
5555 EXPORT_SYMBOL(dim_park_tired);
5656
57
-void dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
57
+bool dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
5858 struct dim_stats *curr_stats)
5959 {
6060 /* u32 holds up to 71 minutes, should be enough */
....@@ -66,7 +66,7 @@
6666 start->comp_ctr);
6767
6868 if (!delta_us)
69
- return;
69
+ return false;
7070
7171 curr_stats->ppms = DIV_ROUND_UP(npkts * USEC_PER_MSEC, delta_us);
7272 curr_stats->bpms = DIV_ROUND_UP(nbytes * USEC_PER_MSEC, delta_us);
....@@ -79,5 +79,6 @@
7979 else
8080 curr_stats->cpe_ratio = 0;
8181
82
+ return true;
8283 }
8384 EXPORT_SYMBOL(dim_calc_stats);