From patchwork Fri Dec 12 16:06:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 5483651 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A06ABBEEA8 for ; Fri, 12 Dec 2014 16:06:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DFE10201C8 for ; Fri, 12 Dec 2014 16:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E54E20172 for ; Fri, 12 Dec 2014 16:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935045AbaLLQG3 (ORCPT ); Fri, 12 Dec 2014 11:06:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44592 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935018AbaLLQGY (ORCPT ); Fri, 12 Dec 2014 11:06:24 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBCG6N14010556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Dec 2014 11:06:23 -0500 Received: from hawk.usersys.redhat.com (dhcp-1-108.brq.redhat.com [10.34.1.108]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBCG6Kmg007006; Fri, 12 Dec 2014 11:06:23 -0500 From: Andrew Jones To: kvm@vger.kernel.org Subject: [PATCH 02/10] x86: pmu: report takes a fmt Date: Fri, 12 Dec 2014 17:06:09 +0100 Message-Id: <1418400377-17388-3-git-send-email-drjones@redhat.com> In-Reply-To: <1418400377-17388-1-git-send-email-drjones@redhat.com> References: <1418400377-17388-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Andrew Jones --- x86/pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/x86/pmu.c b/x86/pmu.c index 5c85146810cb1..f116bafebf424 100644 --- a/x86/pmu.c +++ b/x86/pmu.c @@ -228,14 +228,12 @@ static void check_gp_counter(struct pmu_event *evt) .ctr = MSR_IA32_PERFCTR0, .config = EVNTSEL_OS | EVNTSEL_USR | evt->unit_sel, }; - char fmt[100]; int i; for (i = 0; i < num_counters; i++, cnt.ctr++) { cnt.count = 0; measure(&cnt, 1); - snprintf(fmt, sizeof(fmt), "%s-%%d", evt->name); - report(fmt, verify_event(cnt.count, evt), i); + report("%s-%%d", verify_event(cnt.count, evt), evt->name, i); } }