linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Ingo Molnar <mingo@redhat.com>, Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/7] kernel-trace: Replace five seq_puts() calls by seq_putc()
Date: Fri, 5 May 2017 23:02:31 +0200	[thread overview]
Message-ID: <d7f03e83-07f8-b8d8-9a22-41dceb5de174@users.sourceforge.net> (raw)
In-Reply-To: <3419381c-6a8f-f0f6-86e8-3ee7f9af0076@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 5 May 2017 19:45:12 +0200

Five single characters should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 kernel/trace/trace_events_hist.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 94999934ffd5..df566e21344d 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1013,7 +1013,7 @@ hist_trigger_entry_print(struct seq_file *m,
 	}
 
 	if (!multiline)
-		seq_puts(m, " ");
+		seq_putc(m, ' ');
 
 	seq_printf(m, "} hitcount: %10llu",
 		   tracing_map_read_sum(elt, HITCOUNT_IDX));
@@ -1030,7 +1030,7 @@ hist_trigger_entry_print(struct seq_file *m,
 		}
 	}
 
-	seq_puts(m, "\n");
+	seq_putc(m, '\n');
 }
 
 static int print_entries(struct seq_file *m,
@@ -1168,7 +1168,7 @@ static int event_hist_trigger_print(struct seq_file *m,
 		key_field = hist_data->fields[i];
 
 		if (i > hist_data->n_vals)
-			seq_puts(m, ",");
+			seq_putc(m, ',');
 
 		if (key_field->flags & HIST_FIELD_FL_STACKTRACE)
 			seq_puts(m, "stacktrace");
@@ -1182,7 +1182,7 @@ static int event_hist_trigger_print(struct seq_file *m,
 		if (i == HITCOUNT_IDX)
 			seq_puts(m, "hitcount");
 		else {
-			seq_puts(m, ",");
+			seq_putc(m, ',');
 			hist_field_print(m, hist_data->fields[i]);
 		}
 	}
@@ -1195,7 +1195,7 @@ static int event_hist_trigger_print(struct seq_file *m,
 		sort_key = &hist_data->sort_keys[i];
 
 		if (i > 0)
-			seq_puts(m, ",");
+			seq_putc(m, ',');
 
 		if (sort_key->field_idx == HITCOUNT_IDX)
 			seq_puts(m, "hitcount");
-- 
2.12.2

  parent reply	other threads:[~2017-05-05 21:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 21:00 [PATCH 0/7] kernel-trace: Fine-tuning for seven function implementations SF Markus Elfring
2017-05-05 21:01 ` [PATCH 1/7] kernel-trace: Combine two function calls into one in hist_trigger_entry_print() SF Markus Elfring
2017-05-05 21:02 ` SF Markus Elfring [this message]
2017-05-05 21:03 ` [PATCH 3/7] kernel-trace: Adjust two checks for null pointers in compatible_field() SF Markus Elfring
2017-05-23  5:15   ` Steven Rostedt
2017-05-05 21:04 ` [PATCH 4/7] kernel-trace: Improve a size determination in create_hist_field() SF Markus Elfring
2017-05-05 21:05 ` [PATCH 5/7] kernel-trace: Replace two seq_printf() calls by seq_puts() in probes_seq_show() SF Markus Elfring
2017-05-05 21:06 ` [PATCH 0/7] kernel-trace: Fine-tuning for seven function implementations Steven Rostedt
2017-05-05 21:21   ` SF Markus Elfring
2017-05-22  7:45   ` SF Markus Elfring
2017-05-23  5:18     ` Steven Rostedt
2017-05-05 21:06 ` [PATCH 6/7] kernel-trace: Adjust two checks for null pointers in uprobe_buffer_init() SF Markus Elfring
2017-05-05 21:09 ` SF Markus Elfring
2017-05-05 21:10 ` [PATCH 7/7] kernel-trace: Delete an error message for a failed memory allocation in create_trace_uprobe() SF Markus Elfring

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=d7f03e83-07f8-b8d8-9a22-41dceb5de174@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /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;
as well as URLs for NNTP newsgroup(s).