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:
Родитель
7b3efb50f7
Коммит
07ff4aed01
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче