Commit 07ff4aed authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Thomas Gleixner
Browse files

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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210303103544.994855-1-mkl@pengutronix.de
parent 7b3efb50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;