Commit d33d5e68 authored by John Ogness's avatar John Ogness Committed by Petr Mladek

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: default avatarJohn Ogness <john.ogness@linutronix.de>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/87plpum4jw.fsf@jogness.linutronix.deSigned-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 85a147a9
......@@ -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);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment