mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
kernel: refactor: shorten has_pending_signals
In has_pending_signals there was a switch/case used for optimizations. However, today's compilers perform loop unrolling efficiently, thus it is not needed anymore. Put i inside the for declaration so we do not risk its escape from the scope. Moreover, i starts now from 0 and counts up, as it is a more usual pattern. Link: https://lore.kernel.org/20260520062849.183621-2-andrea.calabrese@amarulasolutions.com Signed-off-by: Andrea Calabrese <andrea.calabrese@amarulasolutions.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Adrian Huang <adrianhuang0701@gmail.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Marco Elver <elver@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
64d9183203
commit
b7a8d7589a
1 changed files with 4 additions and 22 deletions
Loading…
Add table
Add a link
Reference in a new issue