Subject: [PATCH]perf/core: remove newline char in perf_event_sysfs_show

From: Madhavan Srinivasan <[email-masked]>
Date: Thu, 28 May 2015 14:59:26 +0530

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 <[email-masked]>
Cc: Jiri Olsa <[email-masked]>
Cc: Sukadev Bhattiprolu <[email-masked]>
Cc: Michael Ellerman <[email-masked]>
Signed-off-by: Madhavan Srinivasan <[email-masked]>
---
 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