Not all compilers accept anonymous field initialization, e.g. gcc
4.5.1.

Signed-off-by: Jan Kiszka <[email protected]>
---
 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);

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to