mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-22 07:53:11 -05:00
dim: make dim_calc_stats() inputs const pointers
Make the start and end arguments to dim_calc_stats() const pointers to clarify that the function does not modify their values. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Arthur Kiyanovski <akiyano@amazon.com> Link: https://patch.msgid.link/20241031002326.3426181-1-csander@purestorage.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6b2d11e2d8
commit
a865276872
2 changed files with 4 additions and 2 deletions
|
@ -351,7 +351,8 @@ void dim_park_tired(struct dim *dim);
|
||||||
* Takes into consideration counter wrap-around.
|
* Takes into consideration counter wrap-around.
|
||||||
* Returned boolean indicates whether curr_stats are reliable.
|
* Returned boolean indicates whether curr_stats are reliable.
|
||||||
*/
|
*/
|
||||||
bool dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
|
bool dim_calc_stats(const struct dim_sample *start,
|
||||||
|
const struct dim_sample *end,
|
||||||
struct dim_stats *curr_stats);
|
struct dim_stats *curr_stats);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -54,7 +54,8 @@ void dim_park_tired(struct dim *dim)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dim_park_tired);
|
EXPORT_SYMBOL(dim_park_tired);
|
||||||
|
|
||||||
bool dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
|
bool dim_calc_stats(const struct dim_sample *start,
|
||||||
|
const struct dim_sample *end,
|
||||||
struct dim_stats *curr_stats)
|
struct dim_stats *curr_stats)
|
||||||
{
|
{
|
||||||
/* u32 holds up to 71 minutes, should be enough */
|
/* u32 holds up to 71 minutes, should be enough */
|
||||||
|
|
Loading…
Reference in a new issue