Skip to contentSkip to conversation

MIPS: prom.c: Only show machine name when it is available

PATCH New Kelvin Cheung 1 participant 1 message Sep 5, 2014 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: prom.c: Only show machine name when it is available

'Unknown' machine name in /proc/cpuinfo will make users confused. Therefore, it is better to show it only when it is available.

---
 arch/mips/kernel/prom.c | 3 +++
 1 file changed, 3 insertions(+)
arch/mips/kernel/prom.c +3 -0
index 5d39bb8..595fa5c 100644
@@ -33,6 +33,9 @@ __init void mips_set_machine_name(const char *name)
 
 char *mips_get_machine_name(void)
 {
+	if (!strncmp(mips_machine_name, "Unknown", 64))
+		return NULL;
+
 	return mips_machine_name;
 }
 
Signature · 1 line
1.9.1