linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KCM: Fine-tuning for three function implementations
@ 2017-05-06 12:14 SF Markus Elfring
  2017-05-06 12:15 ` [PATCH 1/2] kcm: Replace three seq_puts() calls by seq_putc() SF Markus Elfring
  2017-05-06 12:16 ` [PATCH 2/2] kcm: Use seq_puts() in kcm_format_psock() SF Markus Elfring
  0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-05-06 12:14 UTC (permalink / raw)
  To: netdev, Colin Ian King, David S. Miller, Jiri Slaby, Tom Herbert
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 14:11:22 +0200

Two update suggestions were taken into account
from static source code analysis.

Markus Elfring (2):
  Replace three seq_puts() calls by seq_putc()
  Use seq_puts() in kcm_format_psock()

 net/kcm/kcmproc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.12.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] kcm: Replace three seq_puts() calls by seq_putc()
  2017-05-06 12:14 [PATCH 0/2] KCM: Fine-tuning for three function implementations SF Markus Elfring
@ 2017-05-06 12:15 ` SF Markus Elfring
  2017-05-06 12:16 ` [PATCH 2/2] kcm: Use seq_puts() in kcm_format_psock() SF Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-05-06 12:15 UTC (permalink / raw)
  To: netdev, Colin Ian King, David S. Miller, Jiri Slaby, Tom Herbert
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 13:53:41 +0200

Three single characters (line breaks) 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>
---
 net/kcm/kcmproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index bf75c9231cca..46b8b5f6c57f 100644
--- a/net/kcm/kcmproc.c
+++ b/net/kcm/kcmproc.c
@@ -116,7 +116,7 @@ static void kcm_format_mux_header(struct seq_file *seq)
 		   "Status");
 
 	/* XXX: pdsts header stuff here */
-	seq_puts(seq, "\n");
+	seq_putc(seq, '\n');
 }
 
 static void kcm_format_sock(struct kcm_sock *kcm, struct seq_file *seq,
@@ -146,7 +146,7 @@ static void kcm_format_sock(struct kcm_sock *kcm, struct seq_file *seq,
 	if (kcm->rx_wait)
 		seq_puts(seq, "RxWait ");
 
-	seq_puts(seq, "\n");
+	seq_putc(seq, '\n');
 }
 
 static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq,
@@ -192,7 +192,7 @@ static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq,
 			seq_puts(seq, "RdyRx ");
 	}
 
-	seq_puts(seq, "\n");
+	seq_putc(seq, '\n');
 }
 
 static void
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] kcm: Use seq_puts() in kcm_format_psock()
  2017-05-06 12:14 [PATCH 0/2] KCM: Fine-tuning for three function implementations SF Markus Elfring
  2017-05-06 12:15 ` [PATCH 1/2] kcm: Replace three seq_puts() calls by seq_putc() SF Markus Elfring
@ 2017-05-06 12:16 ` SF Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-05-06 12:16 UTC (permalink / raw)
  To: netdev, Colin Ian King, David S. Miller, Jiri Slaby, Tom Herbert
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 14:04:02 +0200

A string which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 net/kcm/kcmproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index 46b8b5f6c57f..b59b46822d9e 100644
--- a/net/kcm/kcmproc.c
+++ b/net/kcm/kcmproc.c
@@ -182,7 +182,7 @@ static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq,
 				seq_printf(seq, "RxWait=%u ",
 					   psock->strp.rx_need_bytes);
 			else
-				seq_printf(seq, "RxWait ");
+				seq_puts(seq, "RxWait ");
 		}
 	} else  {
 		if (psock->strp.rx_paused)
-- 
2.12.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-06 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-06 12:14 [PATCH 0/2] KCM: Fine-tuning for three function implementations SF Markus Elfring
2017-05-06 12:15 ` [PATCH 1/2] kcm: Replace three seq_puts() calls by seq_putc() SF Markus Elfring
2017-05-06 12:16 ` [PATCH 2/2] kcm: Use seq_puts() in kcm_format_psock() SF Markus Elfring

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).