mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
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:
parent
7b3efb50f7
commit
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;
|
||||
|
Loading…
Reference in New Issue
Block a user