Skip to contentSkip to conversation

KVM: PPC: remove unused varible

PATCH Applied [email protected] 2 participants 2 messages Aug 16, 2024 – Sep 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: remove unused varible

From: Alex Shi <[email protected]>

During build testing, we found a error:
/arch/powerpc/kvm/book3s_hv.c:4052:17: error: variable 'loops' set but not used [-Werror,-Wunused-but-set-variable]

                unsigned long loops = 0;

1 error generated.

Remove the unused variable could fix this.

Cc Naveen N Rao <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Michael Ellerman <[email protected]>
---
 arch/powerpc/kvm/book3s_hv.c | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/kvm/book3s_hv.c +0 -2
index 8f7d7e37bc8c..ac27ca4385e4 100644
@@ -4049,7 +4049,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
 	/* Return to whole-core mode if we split the core earlier */
 	if (cmd_bit) {
 		unsigned long hid0 = mfspr(SPRN_HID0);
-		unsigned long loops = 0;
 
 		hid0 &= ~HID0_POWER8_DYNLPARDIS;
 		stat_bit = HID0_POWER8_2LPARMODE | HID0_POWER8_4LPARMODE;
@@ -4061,7 +4060,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
 			if (!(hid0 & stat_bit))
 				break;
 			cpu_relax();
-			++loops;
 		}
 		split_info.do_nap = 0;
 	}
Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · On Fri, 16 Aug 2024 17:33:12 +0800, [email protected] wrote:

During build testing, we found a error:
/arch/powerpc/kvm/book3s_hv.c:4052:17: error: variable 'loops' set but not used [-Werror,-Wunused-but-set-variable]

                unsigned long loops = 0;

1 error generated.

Remove the unused variable could fix this.

[...]

Applied to powerpc/topic/ppc-kvm.

[1/1] KVM: PPC: remove unused varible

      https://git.kernel.org/powerpc/c/46765aaec4d78b9fef59e647ab228283991de075

cheers