From 823aab8296cd4a13587256ae1a5bd1dc233922b5 Mon Sep 17 00:00:00 2001 From: konrad Date: Mon, 2 Jan 2023 00:15:41 +0100 Subject: [PATCH] Kernel: Use a descriptive name for x86-64 `cpu_feature_to_string_view` Settled for `cpu_feature_to_name` as that naming is more descriptive and similarly named `cpu_feature_to_description` function will be provided for Aarch64. --- Kernel/Arch/x86_64/CPUID.cpp | 2 +- Kernel/Arch/x86_64/CPUID.h | 2 +- Kernel/Arch/x86_64/ProcessorInfo.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/Arch/x86_64/CPUID.cpp b/Kernel/Arch/x86_64/CPUID.cpp index be39e2ae3c..6485f0c3a3 100644 --- a/Kernel/Arch/x86_64/CPUID.cpp +++ b/Kernel/Arch/x86_64/CPUID.cpp @@ -8,7 +8,7 @@ namespace Kernel { -StringView cpu_feature_to_string_view(CPUFeature::Type const& feature) +StringView cpu_feature_to_name(CPUFeature::Type const& feature) { if (feature == CPUFeature::SSE3) return "sse3"sv; diff --git a/Kernel/Arch/x86_64/CPUID.h b/Kernel/Arch/x86_64/CPUID.h index c19211a427..fc3038be43 100644 --- a/Kernel/Arch/x86_64/CPUID.h +++ b/Kernel/Arch/x86_64/CPUID.h @@ -237,6 +237,6 @@ AK_MAKE_ARBITRARY_SIZED_ENUM(CPUFeature, u256, NONSTOP_TSC = CPUFeature(1u) << 191u, // Invariant TSC __End = CPUFeature(1u) << 255u); -StringView cpu_feature_to_string_view(CPUFeature::Type const&); +StringView cpu_feature_to_name(CPUFeature::Type const&); } diff --git a/Kernel/Arch/x86_64/ProcessorInfo.cpp b/Kernel/Arch/x86_64/ProcessorInfo.cpp index 43c8b0ed0a..7075710c2f 100644 --- a/Kernel/Arch/x86_64/ProcessorInfo.cpp +++ b/Kernel/Arch/x86_64/ProcessorInfo.cpp @@ -111,7 +111,7 @@ NonnullOwnPtr ProcessorInfo::build_features_string(Processor const& pro first = false; else MUST(builder.try_append(' ')); - MUST(builder.try_append(cpu_feature_to_string_view(feature))); + MUST(builder.try_append(cpu_feature_to_name(feature))); } } return KString::must_create(builder.string_view());