From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: x86: Fix build breakage due to anonymous field initialization Date: Thu, 15 Dec 2011 13:04:04 +0100 Message-ID: <4EE9E234.6050702@siemens.com> References: <1319993624-20247-1-git-send-email-gleb@redhat.com> <1319993624-20247-3-git-send-email-gleb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org, linux-kernel@redhat.com, mingo@elte.hu, a.p.zijlstra@chello.nl, acme@ghostprotocols.net To: avi@redhat.com, mtosatti@redhat.com Return-path: Received: from goliath.siemens.de ([192.35.17.28]:27104 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367Ab1LOMEb (ORCPT ); Thu, 15 Dec 2011 07:04:31 -0500 In-Reply-To: <1319993624-20247-3-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Not all compilers accept anonymous field initialization, e.g. gcc 4.5.1. Signed-off-by: Jan Kiszka --- arch/x86/kvm/pmu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 061a03f..7aad544 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -170,10 +170,11 @@ static void reprogram_counter(struct kvm_pmc *pmc, u32 type, .exclude_host = 1, .exclude_user = exclude_user, .exclude_kernel = exclude_kernel, - .sample_period = (-pmc->counter) & pmc_bitmask(pmc), .config = config, }; + attr.sample_period = (-pmc->counter) & pmc_bitmask(pmc); + event = perf_event_create_kernel_counter(&attr, -1, current, intr ? kvm_perf_overflow_intr : kvm_perf_overflow, pmc);