public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Richter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
	hpa@zytor.com, mingo@kernel.org, acme@redhat.com,
	heiko.carstens@de.ibm.com, linux-kernel@vger.kernel.org,
	tmricht@linux.vnet.ibm.com, tglx@linutronix.de
Subject: [tip:perf/core] perf s390: Fix reading cpuid model information
Date: Wed, 21 Feb 2018 02:25:13 -0800	[thread overview]
Message-ID: <tip-47812e00910407a0f14906c0a3bf2d803a616c6f@git.kernel.org> (raw)
In-Reply-To: <20180219102444.96900-1-tmricht@linux.vnet.ibm.com>

Commit-ID:  47812e00910407a0f14906c0a3bf2d803a616c6f
Gitweb:     https://git.kernel.org/tip/47812e00910407a0f14906c0a3bf2d803a616c6f
Author:     Thomas Richter <tmricht@linux.vnet.ibm.com>
AuthorDate: Mon, 19 Feb 2018 11:24:44 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 19 Feb 2018 09:16:01 -0300

perf s390: Fix reading cpuid model information

Commit eca0fa28cd0d (perf record: Provide detailed information on s390
CPU") fixed a  build error on Ubuntu. However the fix uses the wrong
size to print the model information.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Fixes: eca0fa28cd0d ("perf record: Provide detailed information on s390 CPU")
Link: http://lkml.kernel.org/r/20180219102444.96900-1-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/s390/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/s390/util/header.c b/tools/perf/arch/s390/util/header.c
index 231294b..a4c30f1 100644
--- a/tools/perf/arch/s390/util/header.c
+++ b/tools/perf/arch/s390/util/header.c
@@ -81,7 +81,7 @@ int get_cpuid(char *buffer, size_t sz)
 			line2 = line + strlen(SYSINFO_MODEL);
 
 			while ((cp = strtok_r(line2, "\n ", &line2))) {
-				mdsize += scnprintf(model + mdsize, sizeof(type) - mdsize,
+				mdsize += scnprintf(model + mdsize, sizeof(model) - mdsize,
 						    "%s%s", model[0] ? "," : "", cp);
 			}
 			break;

      parent reply	other threads:[~2018-02-21 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 10:24 [PATCH] perf s390: Fix reading cpuid model information Thomas Richter
2018-02-19 12:13 ` Arnaldo Carvalho de Melo
2018-02-21 10:25 ` tip-bot for Thomas Richter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-47812e00910407a0f14906c0a3bf2d803a616c6f@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tmricht@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox