Commit 52a1ec71 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

unwind: Simplify unwind_reset_info()



Invert the condition of the first if and make it an early exit to
reduce an indent level for the rest fo the function.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Link: https://patch.msgid.link/20250924080118.777916262@infradead.org
parent b1164c7d
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -46,11 +46,12 @@ void unwind_deferred_task_exit(struct task_struct *task);
static __always_inline void unwind_reset_info(void)
{
	struct unwind_task_info *info = &current->unwind_info;
	unsigned long bits;
	unsigned long bits = info->unwind_mask;

	/* Was there any unwinding? */
	if (unlikely(info->unwind_mask)) {
		bits = info->unwind_mask;
	if (likely(!bits))
		return;

	do {
		/* Is a task_work going to run again before going back */
		if (bits & UNWIND_PENDING)
@@ -63,7 +64,6 @@ static __always_inline void unwind_reset_info(void)
		info->cache->unwind_completed = 0;
	}
}
}

#else /* !CONFIG_UNWIND_USER */