Skip to contentSkip to conversation

timers/migration: Remove redundant ternary operator

PATCH In review Fushuai Wang 2 participants 2 messages Oct 5, 2025 – Nov 1, 2025 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 timers/migration: Remove redundant ternary operator

The ternary operator is redundant here, so remove it.

---
 kernel/time/timer_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/timer_migration.c +1 -1
index c0c54dc5314c..b869b244025f 100644
@@ -751,7 +751,7 @@ bool tmigr_update_events(struct tmigr_group *group, struct tmigr_group *child,
 		 * be scheduled. If the activate wins, the event is properly
 		 * ignored.
 		 */
-		ignore = (nextexp == KTIME_MAX) ? true : false;
+		ignore = (nextexp == KTIME_MAX);
 		WRITE_ONCE(evt->ignore, ignore);
 	} else {
 		nextexp = data->nextexp;
Signature · 1 line
2.36.1
#1 lore raw
Quoted 12 lines · Fushuai Wang

The ternary operator is redundant here, so remove it.

---
 kernel/time/timer_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/timer_migration.c +0 -0
index c0c54dc5314c..b869b244025f 100644

kernel/time/timer_migration.c bool tmigr_update_events(struct tmigr_group *group, struct tmigr_group *child, · line 754

Quoted 5 lines
kernel/time/timer_migration.c +1 -1
@@ -751,7 +751,7 @@ bool tmigr_update_events(struct tmigr_group *group, struct tmigr_group *child,
 		 * be scheduled. If the activate wins, the event is properly
 		 * ignored.
 		 */
-		ignore = (nextexp == KTIME_MAX) ? true : false;
+		ignore = (nextexp == KTIME_MAX);

The parentheses are pointless too, no?