From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Jan Beulich" <JBeulich@suse.com>
Subject: [PATCH 2/4] tools/xen-cpuid: Rename decodes[] to leaf_info[]
Date: Fri, 10 May 2024 23:40:00 +0100 [thread overview]
Message-ID: <20240510224002.2324578-3-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <20240510224002.2324578-1-andrew.cooper3@citrix.com>
From: Roger Pau Monné <roger.pau@citrix.com>
Split out of subsequent patch to aid legibility.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
v3:
* New (split out)
---
tools/misc/xen-cpuid.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
index 8893547bebce..6ee835b22949 100644
--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -268,8 +268,7 @@ static const struct {
const char *name;
const char *abbr;
const char *const *strs;
-} decodes[] =
-{
+} leaf_info[] = {
{ "CPUID 0x00000001.edx", "1d", str_1d },
{ "CPUID 0x00000001.ecx", "1c", str_1c },
{ "CPUID 0x80000001.edx", "e1d", str_e1d },
@@ -336,11 +335,11 @@ static void decode_featureset(const uint32_t *features,
if ( !detail )
return;
- for ( i = 0; i < length && i < ARRAY_SIZE(decodes); ++i )
+ for ( i = 0; i < length && i < ARRAY_SIZE(leaf_info); ++i )
{
- printf(" [%02u] %-"COL_ALIGN"s", i, decodes[i].name ?: "<UNKNOWN>");
- if ( decodes[i].name )
- dump_leaf(features[i], decodes[i].strs);
+ printf(" [%02u] %-"COL_ALIGN"s", i, leaf_info[i].name ?: "<UNKNOWN>");
+ if ( leaf_info[i].name )
+ dump_leaf(features[i], leaf_info[i].strs);
printf("\n");
}
}
@@ -355,8 +354,8 @@ static void dump_info(xc_interface *xch, bool detail)
if ( !detail )
{
printf(" %"COL_ALIGN"s ", "KEY");
- for ( i = 0; i < ARRAY_SIZE(decodes); ++i )
- printf("%-8s ", decodes[i].abbr ?: "???");
+ for ( i = 0; i < ARRAY_SIZE(leaf_info); ++i )
+ printf("%-8s ", leaf_info[i].abbr ?: "???");
printf("\n");
}
--
2.30.2
next prev parent reply other threads:[~2024-05-10 22:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 22:39 [PATCH v3 0/4] x86/xen-cpuid: Use automagically generated names Andrew Cooper
2024-05-10 22:39 ` [PATCH 1/4] x86/gen-cpuid: Minor cleanup Andrew Cooper
2024-05-14 7:14 ` Roger Pau Monné
2024-05-20 14:17 ` Andrew Cooper
2024-05-10 22:40 ` Andrew Cooper [this message]
2024-05-14 7:14 ` [PATCH 2/4] tools/xen-cpuid: Rename decodes[] to leaf_info[] Roger Pau Monné
2024-05-10 22:40 ` [PATCH 3/4] tools/xen-cpuid: Use automatically generated feature names Andrew Cooper
2024-05-14 7:53 ` Roger Pau Monné
2024-05-14 13:05 ` Jan Beulich
2024-05-14 13:05 ` Andrew Cooper
2024-05-14 14:27 ` Roger Pau Monné
2024-05-14 14:30 ` Andrew Cooper
2024-05-20 14:33 ` [PATCH v3.5 " Andrew Cooper
2024-05-20 15:07 ` Roger Pau Monné
2024-05-20 15:20 ` Andrew Cooper
2024-05-20 16:29 ` Roger Pau Monné
2024-05-20 17:37 ` Andrew Cooper
2024-05-10 22:40 ` [PATCH 4/4] tools/xen-cpuid: Drop old names Andrew Cooper
2024-05-14 7:53 ` Roger Pau Monné
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=20240510224002.2324578-3-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).