diff options
author | 2024-08-27 16:25:31 +0206 | |
---|---|---|
committer | 2024-09-04 12:28:25 +0200 | |
commit | d33d5e683b0d3b4f5fc6a49ce17583f8ca663944 (patch) | |
tree | 940a6cd9565510e6daa95c4f07919f04596e909f | |
parent | printk: Use the BITS_PER_LONG macro (diff) | |
download | wireguard-linux-d33d5e683b0d3b4f5fc6a49ce17583f8ca663944.tar.xz wireguard-linux-d33d5e683b0d3b4f5fc6a49ce17583f8ca663944.zip |
printk: nbcon: Use raw_cpu_ptr() instead of open coding
There is no need to open code a non-migration-checking
this_cpu_ptr(). That is exactly what raw_cpu_ptr() is.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/87plpum4jw.fsf@jogness.linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
-rw-r--r-- | kernel/printk/nbcon.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c index 92ac5c590927..cf62f675c673 100644 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@ -998,8 +998,7 @@ static __ref unsigned int *nbcon_get_cpu_emergency_nesting(void) if (!printk_percpu_data_ready()) return &early_nbcon_pcpu_emergency_nesting; - /* Open code this_cpu_ptr() without checking migration. */ - return per_cpu_ptr(&nbcon_pcpu_emergency_nesting, raw_smp_processor_id()); + return raw_cpu_ptr(&nbcon_pcpu_emergency_nesting); } /** |