time/timecounter: Mark 1st argument of timecounter_cyc2time() as const

The timecounter is not modified in this function. Mark it as const.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210303103544.994855-1-mkl@pengutronix.de
This commit is contained in:
Marc Kleine-Budde 2021-03-03 11:35:44 +01:00 committed by Thomas Gleixner
parent 7b3efb50f7
commit 07ff4aed01
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ extern u64 timecounter_read(struct timecounter *tc);
* This allows conversion of cycle counter values which were generated
* in the past.
*/
extern u64 timecounter_cyc2time(struct timecounter *tc,
extern u64 timecounter_cyc2time(const struct timecounter *tc,
u64 cycle_tstamp);
#endif

View File

@ -76,7 +76,7 @@ static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc,
return ns;
}
u64 timecounter_cyc2time(struct timecounter *tc,
u64 timecounter_cyc2time(const struct timecounter *tc,
u64 cycle_tstamp)
{
u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask;