提交 75bda950 编写于 作者: N Nicholas Piggin 提交者: Michael Ellerman

powerpc: Don't print cpu_spec->cpu_name if it's NULL

Currently we assume that if the cpu_spec has a pvr_mask then it must also have a
cpu_name. But that will change in a subsequent commit when we do CPU feature
discovery via the device tree, so check explicitly if cpu_name is NULL.
Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 ea47dd19
...@@ -256,7 +256,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -256,7 +256,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "processor\t: %lu\n", cpu_id); seq_printf(m, "processor\t: %lu\n", cpu_id);
seq_printf(m, "cpu\t\t: "); seq_printf(m, "cpu\t\t: ");
if (cur_cpu_spec->pvr_mask) if (cur_cpu_spec->pvr_mask && cur_cpu_spec->cpu_name)
seq_printf(m, "%s", cur_cpu_spec->cpu_name); seq_printf(m, "%s", cur_cpu_spec->cpu_name);
else else
seq_printf(m, "unknown (%08x)", pvr); seq_printf(m, "unknown (%08x)", pvr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册