From: Anders Roxell <anders.roxell@linaro.org>
To: williams@redhat.com, davids@redhat.com
Cc: linux-rt-users@vger.kernel.org, Anders Roxell <anders.roxell@linaro.org>
Subject: [RTEVAL PATCH] rteval: misc.py: cpuinfo: set default value for 'model name'
Date: Thu, 15 Oct 2020 08:50:54 +0200 [thread overview]
Message-ID: <20201015065054.645567-1-anders.roxell@linaro.org> (raw)
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
reply other threads:[~2020-10-15 6:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201015065054.645567-1-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=davids@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).