Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

alarmtimers: Remove return value from alarm functions

Now that the SIG_IGN problem is solved in the core code, the alarmtimer
callbacks do not require a return value anymore.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/all/20241105064214.318837272@linutronix.de

+10 -27
+1 -2
drivers/power/supply/charger-manager.c
··· 1412 1412 return dev_get_platdata(&pdev->dev); 1413 1413 } 1414 1414 1415 - static enum alarmtimer_restart cm_timer_func(struct alarm *alarm, ktime_t now) 1415 + static void cm_timer_func(struct alarm *alarm, ktime_t now) 1416 1416 { 1417 1417 cm_timer_set = false; 1418 - return ALARMTIMER_NORESTART; 1419 1418 } 1420 1419 1421 1420 static int charger_manager_probe(struct platform_device *pdev)
+1 -3
fs/timerfd.c
··· 79 79 return HRTIMER_NORESTART; 80 80 } 81 81 82 - static enum alarmtimer_restart timerfd_alarmproc(struct alarm *alarm, 83 - ktime_t now) 82 + static void timerfd_alarmproc(struct alarm *alarm, ktime_t now) 84 83 { 85 84 struct timerfd_ctx *ctx = container_of(alarm, struct timerfd_ctx, 86 85 t.alarm); 87 86 timerfd_triggered(ctx); 88 - return ALARMTIMER_NORESTART; 89 87 } 90 88 91 89 /*
+2 -8
include/linux/alarmtimer.h
··· 20 20 ALARM_BOOTTIME_FREEZER, 21 21 }; 22 22 23 - enum alarmtimer_restart { 24 - ALARMTIMER_NORESTART, 25 - ALARMTIMER_RESTART, 26 - }; 27 - 28 - 29 23 #define ALARMTIMER_STATE_INACTIVE 0x00 30 24 #define ALARMTIMER_STATE_ENQUEUED 0x01 31 25 ··· 36 42 struct alarm { 37 43 struct timerqueue_node node; 38 44 struct hrtimer timer; 39 - enum alarmtimer_restart (*function)(struct alarm *, ktime_t now); 45 + void (*function)(struct alarm *, ktime_t now); 40 46 enum alarmtimer_type type; 41 47 int state; 42 48 void *data; 43 49 }; 44 50 45 51 void alarm_init(struct alarm *alarm, enum alarmtimer_type type, 46 - enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); 52 + void (*function)(struct alarm *, ktime_t)); 47 53 void alarm_start(struct alarm *alarm, ktime_t start); 48 54 void alarm_start_relative(struct alarm *alarm, ktime_t start); 49 55 void alarm_restart(struct alarm *alarm);
+5 -11
kernel/time/alarmtimer.c
··· 321 321 322 322 static void 323 323 __alarm_init(struct alarm *alarm, enum alarmtimer_type type, 324 - enum alarmtimer_restart (*function)(struct alarm *, ktime_t)) 324 + void (*function)(struct alarm *, ktime_t)) 325 325 { 326 326 timerqueue_init(&alarm->node); 327 327 alarm->timer.function = alarmtimer_fired; ··· 337 337 * @function: callback that is run when the alarm fires 338 338 */ 339 339 void alarm_init(struct alarm *alarm, enum alarmtimer_type type, 340 - enum alarmtimer_restart (*function)(struct alarm *, ktime_t)) 340 + void (*function)(struct alarm *, ktime_t)) 341 341 { 342 342 hrtimer_init(&alarm->timer, alarm_bases[type].base_clockid, 343 343 HRTIMER_MODE_ABS); ··· 530 530 * 531 531 * Return: whether the timer is to be restarted 532 532 */ 533 - static enum alarmtimer_restart alarm_handle_timer(struct alarm *alarm, ktime_t now) 533 + static void alarm_handle_timer(struct alarm *alarm, ktime_t now) 534 534 { 535 535 struct k_itimer *ptr = container_of(alarm, struct k_itimer, it.alarm.alarmtimer); 536 536 537 537 guard(spinlock_irqsave)(&ptr->it_lock); 538 538 posix_timer_queue_signal(ptr); 539 - 540 - return ALARMTIMER_NORESTART; 541 539 } 542 540 543 541 /** ··· 696 698 * @now: time at the timer expiration 697 699 * 698 700 * Wakes up the task that set the alarmtimer 699 - * 700 - * Return: ALARMTIMER_NORESTART 701 701 */ 702 - static enum alarmtimer_restart alarmtimer_nsleep_wakeup(struct alarm *alarm, 703 - ktime_t now) 702 + static void alarmtimer_nsleep_wakeup(struct alarm *alarm, ktime_t now) 704 703 { 705 704 struct task_struct *task = alarm->data; 706 705 707 706 alarm->data = NULL; 708 707 if (task) 709 708 wake_up_process(task); 710 - return ALARMTIMER_NORESTART; 711 709 } 712 710 713 711 /** ··· 755 761 756 762 static void 757 763 alarm_init_on_stack(struct alarm *alarm, enum alarmtimer_type type, 758 - enum alarmtimer_restart (*function)(struct alarm *, ktime_t)) 764 + void (*function)(struct alarm *, ktime_t)) 759 765 { 760 766 hrtimer_init_on_stack(&alarm->timer, alarm_bases[type].base_clockid, 761 767 HRTIMER_MODE_ABS);
+1 -3
net/netfilter/xt_IDLETIMER.c
··· 107 107 schedule_work(&timer->work); 108 108 } 109 109 110 - static enum alarmtimer_restart idletimer_tg_alarmproc(struct alarm *alarm, 111 - ktime_t now) 110 + static void idletimer_tg_alarmproc(struct alarm *alarm, ktime_t now) 112 111 { 113 112 struct idletimer_tg *timer = alarm->data; 114 113 115 114 pr_debug("alarm %s expired\n", timer->attr.attr.name); 116 115 schedule_work(&timer->work); 117 - return ALARMTIMER_NORESTART; 118 116 } 119 117 120 118 static int idletimer_check_sysfs_name(const char *name, unsigned int size)