Skip to content

Commit 49916e2

Browse files
Dr. David Alan GilbertKAGA-KOKO
authored andcommitted
timers: Remove unused __round_jiffies(_up)
Remove two trivial but long unused functions. __round_jiffies() has been unused since 2008's commit 9c133c4 ("Add round_jiffies_up and related routines") __round_jiffies_up() has been unused since 2019's commit 7ae3f6e ("powerpc/watchdog: Use hrtimers for per-CPU heartbeat") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250418200803.427911-1-linux@treblig.org
1 parent 0df6db7 commit 49916e2

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

include/linux/timer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,10 @@ extern void init_timers(void);
172172
struct hrtimer;
173173
extern enum hrtimer_restart it_real_fn(struct hrtimer *);
174174

175-
unsigned long __round_jiffies(unsigned long j, int cpu);
176175
unsigned long __round_jiffies_relative(unsigned long j, int cpu);
177176
unsigned long round_jiffies(unsigned long j);
178177
unsigned long round_jiffies_relative(unsigned long j);
179178

180-
unsigned long __round_jiffies_up(unsigned long j, int cpu);
181179
unsigned long __round_jiffies_up_relative(unsigned long j, int cpu);
182180
unsigned long round_jiffies_up(unsigned long j);
183181
unsigned long round_jiffies_up_relative(unsigned long j);

kernel/time/timer.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -385,32 +385,6 @@ static unsigned long round_jiffies_common(unsigned long j, int cpu,
385385
return time_is_after_jiffies(j) ? j : original;
386386
}
387387

388-
/**
389-
* __round_jiffies - function to round jiffies to a full second
390-
* @j: the time in (absolute) jiffies that should be rounded
391-
* @cpu: the processor number on which the timeout will happen
392-
*
393-
* __round_jiffies() rounds an absolute time in the future (in jiffies)
394-
* up or down to (approximately) full seconds. This is useful for timers
395-
* for which the exact time they fire does not matter too much, as long as
396-
* they fire approximately every X seconds.
397-
*
398-
* By rounding these timers to whole seconds, all such timers will fire
399-
* at the same time, rather than at various times spread out. The goal
400-
* of this is to have the CPU wake up less, which saves power.
401-
*
402-
* The exact rounding is skewed for each processor to avoid all
403-
* processors firing at the exact same time, which could lead
404-
* to lock contention or spurious cache line bouncing.
405-
*
406-
* The return value is the rounded version of the @j parameter.
407-
*/
408-
unsigned long __round_jiffies(unsigned long j, int cpu)
409-
{
410-
return round_jiffies_common(j, cpu, false);
411-
}
412-
EXPORT_SYMBOL_GPL(__round_jiffies);
413-
414388
/**
415389
* __round_jiffies_relative - function to round jiffies to a full second
416390
* @j: the time in (relative) jiffies that should be rounded
@@ -482,22 +456,6 @@ unsigned long round_jiffies_relative(unsigned long j)
482456
}
483457
EXPORT_SYMBOL_GPL(round_jiffies_relative);
484458

485-
/**
486-
* __round_jiffies_up - function to round jiffies up to a full second
487-
* @j: the time in (absolute) jiffies that should be rounded
488-
* @cpu: the processor number on which the timeout will happen
489-
*
490-
* This is the same as __round_jiffies() except that it will never
491-
* round down. This is useful for timeouts for which the exact time
492-
* of firing does not matter too much, as long as they don't fire too
493-
* early.
494-
*/
495-
unsigned long __round_jiffies_up(unsigned long j, int cpu)
496-
{
497-
return round_jiffies_common(j, cpu, true);
498-
}
499-
EXPORT_SYMBOL_GPL(__round_jiffies_up);
500-
501459
/**
502460
* __round_jiffies_up_relative - function to round jiffies up to a full second
503461
* @j: the time in (relative) jiffies that should be rounded

0 commit comments

Comments
 (0)