public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Madhavan Srinivasan <maddy@linux•vnet.ibm.com>
To: linux-kernel@vger•kernel.org, linuxppc-dev@lists•ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux•vnet.ibm.com>,
	Ingo Molnar <mingo@kernel•org>, Jiri Olsa <jolsa@redhat•com>,
	Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman•id.au>
Subject: [PATCH]perf/core: remove newline char in perf_event_sysfs_show
Date: Thu, 28 May 2015 14:59:26 +0530	[thread overview]
Message-ID: <1432805366-15854-1-git-send-email-maddy@linux.vnet.ibm.com> (raw)

When a event also carries a event.unit file, having newline char
will make perf userspace tool to print the event name in
the next line when dumping counter data.

Cc: Ingo Molnar <mingo@kernel•org>
Cc: Jiri Olsa <jolsa@redhat•com>
Cc: Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman•id.au>
Signed-off-by: Madhavan Srinivasan <maddy@linux•vnet.ibm.com>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 1a3bf48..3b5a372 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -8982,7 +8982,7 @@ ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr,
 		container_of(attr, struct perf_pmu_events_attr, attr);
 
 	if (pmu_attr->event_str)
-		return sprintf(page, "%s\n", pmu_attr->event_str);
+		return sprintf(page, "%s", pmu_attr->event_str);
 
 	return 0;
 }
-- 
1.9.1

             reply	other threads:[~2015-05-28  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  9:29 Madhavan Srinivasan [this message]
2015-05-28 11:32 ` [PATCH]perf/core: remove newline char in perf_event_sysfs_show Peter Zijlstra

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=1432805366-15854-1-git-send-email-maddy@linux.vnet.ibm.com \
    --to=maddy@linux$(echo .)vnet.ibm.com \
    --cc=jolsa@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mingo@kernel$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=sukadev@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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