summaryrefslogtreecommitdiffstats
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-02-05 19:12:37 +0200
committerJani Nikula <jani.nikula@intel.com>2025-02-05 19:12:37 +0200
commitea9f8f2b21795a5d80418a655bcb212d5b89e08f (patch)
tree16190fb8cb798e7643667784b5a85f60de1f755e /kernel/time/timer.c
parentbdcdb913c2d36447ea49d33774e5d6093c55d6f7 (diff)
parent2014c95afecee3e76ca4a56956a936e23283f05b (diff)
downloadlinux-ea9f8f2b21795a5d80418a655bcb212d5b89e08f.tar.gz
linux-ea9f8f2b21795a5d80418a655bcb212d5b89e08f.zip
Merge drm/drm-next into drm-intel-next
Sync with v6.14-rc1. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index a5860bf6d16f..c8f776dc6ee0 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -301,7 +301,7 @@ static int timer_migration_handler(const struct ctl_table *table, int write,
return ret;
}
-static struct ctl_table timer_sysctl[] = {
+static const struct ctl_table timer_sysctl[] = {
{
.procname = "timer_migration",
.data = &sysctl_timer_migration,
@@ -956,33 +956,29 @@ static int detach_if_pending(struct timer_list *timer, struct timer_base *base,
static inline struct timer_base *get_timer_cpu_base(u32 tflags, u32 cpu)
{
int index = tflags & TIMER_PINNED ? BASE_LOCAL : BASE_GLOBAL;
- struct timer_base *base;
-
- base = per_cpu_ptr(&timer_bases[index], cpu);
/*
* If the timer is deferrable and NO_HZ_COMMON is set then we need
* to use the deferrable base.
*/
if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && (tflags & TIMER_DEFERRABLE))
- base = per_cpu_ptr(&timer_bases[BASE_DEF], cpu);
- return base;
+ index = BASE_DEF;
+
+ return per_cpu_ptr(&timer_bases[index], cpu);
}
static inline struct timer_base *get_timer_this_cpu_base(u32 tflags)
{
int index = tflags & TIMER_PINNED ? BASE_LOCAL : BASE_GLOBAL;
- struct timer_base *base;
-
- base = this_cpu_ptr(&timer_bases[index]);
/*
* If the timer is deferrable and NO_HZ_COMMON is set then we need
* to use the deferrable base.
*/
if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && (tflags & TIMER_DEFERRABLE))
- base = this_cpu_ptr(&timer_bases[BASE_DEF]);
- return base;
+ index = BASE_DEF;
+
+ return this_cpu_ptr(&timer_bases[index]);
}
static inline struct timer_base *get_timer_base(u32 tflags)