[PATCH] cpuid: make internal functions static

7 views
Skip to first unread message

Waldemar Kozaczuk

unread,
Feb 8, 2022, 9:18:40 PM2/8/22
to osv...@googlegroups.com, Waldemar Kozaczuk
Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
---
arch/x64/cpuid.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x64/cpuid.cc b/arch/x64/cpuid.cc
index 45c0fea4..29bc8d6e 100644
--- a/arch/x64/cpuid.cc
+++ b/arch/x64/cpuid.cc
@@ -68,7 +68,7 @@ cpuid_bit cpuid_bits[] = {

constexpr unsigned nr_cpuid_bits = sizeof(cpuid_bits) / sizeof(*cpuid_bits);

-void process_cpuid_bit(features_type& features, const cpuid_bit& b)
+static void process_cpuid_bit(features_type& features, const cpuid_bit& b)
{
bool subleaf = b.leaf == 7;
auto base = b.leaf & 0xf0000000;
@@ -96,7 +96,7 @@ void process_cpuid_bit(features_type& features, const cpuid_bit& b)
features.*(b.flag) = (w >> b.bit) & 1;
}

-void process_xen_bits(features_type &features)
+static void process_xen_bits(features_type &features)
{
signature sig = { 0x566e6558, 0x65584d4d, 0x4d4d566e };

@@ -110,13 +110,13 @@ void process_xen_bits(features_type &features)
}
}

-void process_hyperv_bits(features_type &features) {
+static void process_hyperv_bits(features_type &features) {
if(hyperv_identify() && hyperv_is_timecount_available()) {
features.hyperv_clocksource = true;
}
}

-void process_cpuid(features_type& features)
+static void process_cpuid(features_type& features)
{
for (unsigned i = 0; i < nr_cpuid_bits; ++i) {
process_cpuid_bit(features, cpuid_bits[i]);
--
2.31.1

Commit Bot

unread,
Feb 10, 2022, 3:55:19 AM2/10/22
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

cpuid: make internal functions static

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
Message-Id: <20220209021834.51...@gmail.com>

---
diff --git a/arch/x64/cpuid.cc b/arch/x64/cpuid.cc
Reply all
Reply to author
Forward
0 new messages