linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name'
@ 2020-10-15  6:50 Anders Roxell
  0 siblings, 0 replies; only message in thread
From: Anders Roxell @ 2020-10-15  6:50 UTC (permalink / raw)
  To: williams, davids; +Cc: linux-rt-users, Anders Roxell

Set a default value to 'unknown CPU' for 'model name'. If 'cat
/proc/cpuinfo' don't provide a 'model name' there will be a default set.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 rteval/misc.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rteval/misc.py b/rteval/misc.py
index 0dd361ff19fd..d99b3c20ecda 100644
--- a/rteval/misc.py
+++ b/rteval/misc.py
@@ -75,6 +75,8 @@ def cpuinfo():
         if key == 'processor':
             core = val
             info[core] = {}
+            # default model name if there isn't any in /proc/cpuinfo
+            info[core]["model name"] = "unknown CPU"
             continue
         info[core][key] = val
     return info
-- 
2.28.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-15  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  6:50 [RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name' Anders Roxell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).