diff options
author | Matteo Croce <mcroce@microsoft.com> | 2020-12-15 20:46:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-15 22:46:19 -0800 |
commit | f9a90501faac55ddbea93c1f73497857f1997227 (patch) | |
tree | 37a3b1d168877a6d6d3dd61a8d4eb217086175fe /lib/test_kmod.c | |
parent | d3c227978a130ee18716d3496cf82621d8cda28c (diff) | |
download | linux-stable-f9a90501faac55ddbea93c1f73497857f1997227.tar.gz linux-stable-f9a90501faac55ddbea93c1f73497857f1997227.tar.bz2 linux-stable-f9a90501faac55ddbea93c1f73497857f1997227.zip |
reboot: refactor and comment the cpu selection code
Small improvements to the code, without changing the way it works:
- use a local variable, to avoid a small time lapse where reboot_cpu
can have an invalid value
- comment the code which is not easy to understand at a glance
- merge two identical code blocks into one
- replace pointer arithmetics with equivalent array syntax
Link: https://lkml.kernel.org/r/20201103214025.116799-4-mcroce@linux.microsoft.com
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Robin Holt <robinmholt@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/test_kmod.c')
0 files changed, 0 insertions, 0 deletions