diff mbox series

[1/2] i386: Remove unused parameter "uint32_t bit" in feature_word_description()

Message ID 20241217123932.948789-2-xiaoyao.li@intel.com (mailing list archive)
State New
Headers show
Series Clean up and enhance of feature_word_description() | expand

Commit Message

Xiaoyao Li Dec. 17, 2024, 12:39 p.m. UTC
From: Lei Wang <lei4.wang@intel.com>

Parameter "uint32_t bit" is not used in function feature_word_description(),
so remove it.

Signed-off-by: Lei Wang <lei4.wang@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
 target/i386/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Zhao Liu Dec. 17, 2024, 4:29 p.m. UTC | #1
On Tue, Dec 17, 2024 at 07:39:31AM -0500, Xiaoyao Li wrote:
> Date: Tue, 17 Dec 2024 07:39:31 -0500
> From: Xiaoyao Li <xiaoyao.li@intel.com>
> Subject: [PATCH 1/2] i386: Remove unused parameter "uint32_t bit" in
>  feature_word_description()
> X-Mailer: git-send-email 2.34.1
> 
> From: Lei Wang <lei4.wang@intel.com>
> 
> Parameter "uint32_t bit" is not used in function feature_word_description(),
> so remove it.
> 
> Signed-off-by: Lei Wang <lei4.wang@intel.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
>  target/i386/cpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
diff mbox series

Patch

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 525339945920..d09e2f868c35 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5451,7 +5451,7 @@  static const TypeInfo max_x86_cpu_type_info = {
     .class_init = max_x86_cpu_class_init,
 };
 
-static char *feature_word_description(FeatureWordInfo *f, uint32_t bit)
+static char *feature_word_description(FeatureWordInfo *f)
 {
     assert(f->type == CPUID_FEATURE_WORD || f->type == MSR_FEATURE_WORD);
 
@@ -5490,6 +5490,7 @@  static void mark_unavailable_features(X86CPU *cpu, FeatureWord w, uint64_t mask,
     CPUX86State *env = &cpu->env;
     FeatureWordInfo *f = &feature_word_info[w];
     int i;
+    g_autofree char *feat_word_str = feature_word_description(f);
 
     if (!cpu->force_features) {
         env->features[w] &= ~mask;
@@ -5502,7 +5503,6 @@  static void mark_unavailable_features(X86CPU *cpu, FeatureWord w, uint64_t mask,
 
     for (i = 0; i < 64; ++i) {
         if ((1ULL << i) & mask) {
-            g_autofree char *feat_word_str = feature_word_description(f, i);
             warn_report("%s: %s%s%s [bit %d]",
                         verbose_prefix,
                         feat_word_str,