Skip to content

Commit d33d5e6

Browse files
jognesspmladek
authored andcommitted
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>
1 parent 85a147a commit d33d5e6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

kernel/printk/nbcon.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,7 @@ static __ref unsigned int *nbcon_get_cpu_emergency_nesting(void)
998998
if (!printk_percpu_data_ready())
999999
return &early_nbcon_pcpu_emergency_nesting;
10001000

1001-
/* Open code this_cpu_ptr() without checking migration. */
1002-
return per_cpu_ptr(&nbcon_pcpu_emergency_nesting, raw_smp_processor_id());
1001+
return raw_cpu_ptr(&nbcon_pcpu_emergency_nesting);
10031002
}
10041003

10051004
/**

0 commit comments

Comments
 (0)