* [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations
@ 2017-05-06 16:12 SF Markus Elfring
2017-05-06 16:14 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace a seq_puts() call by seq_putc() in two functions SF Markus Elfring
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: SF Markus Elfring @ 2017-05-06 16:12 UTC (permalink / raw)
To: b.a.t.m.a.n, netdev, Antonio Quartulli, David S. Miller,
Marek Lindner, Simon Wunderlich
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 18:03:45 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Replace a seq_puts() call by seq_putc() in two functions
Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text()
net/batman-adv/bat_iv_ogm.c | 2 +-
net/batman-adv/bat_v.c | 2 +-
net/batman-adv/network-coding.c | 4 +---
3 files changed, 3 insertions(+), 5 deletions(-)
--
2.12.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace a seq_puts() call by seq_putc() in two functions
2017-05-06 16:12 [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations SF Markus Elfring
@ 2017-05-06 16:14 ` SF Markus Elfring
2017-05-06 16:15 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text() SF Markus Elfring
2017-05-23 10:14 ` [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations Sven Eckelmann
2 siblings, 0 replies; 4+ messages in thread
From: SF Markus Elfring @ 2017-05-06 16:14 UTC (permalink / raw)
To: b.a.t.m.a.n, netdev, Antonio Quartulli, David S. Miller,
Marek Lindner, Simon Wunderlich
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 17:50:13 +0200
Two 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/batman-adv/bat_iv_ogm.c | 2 +-
net/batman-adv/bat_v.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 495ba7cdcb04..1f80392ab37c 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1944,7 +1944,7 @@ static void batadv_iv_ogm_orig_print(struct batadv_priv *bat_priv,
batadv_iv_ogm_orig_print_neigh(orig_node, if_outgoing,
seq);
- seq_puts(seq, "\n");
+ seq_putc(seq, '\n');
batman_count++;
next:
diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c
index a36c8e7291d6..4e2724c5b33d 100644
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@ -400,7 +400,7 @@ static void batadv_v_orig_print(struct batadv_priv *bat_priv,
neigh_node->if_incoming->net_dev->name);
batadv_v_orig_print_neigh(orig_node, if_outgoing, seq);
- seq_puts(seq, "\n");
+ seq_putc(seq, '\n');
batman_count++;
next:
--
2.12.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text()
2017-05-06 16:12 [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations SF Markus Elfring
2017-05-06 16:14 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace a seq_puts() call by seq_putc() in two functions SF Markus Elfring
@ 2017-05-06 16:15 ` SF Markus Elfring
2017-05-23 10:14 ` [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations Sven Eckelmann
2 siblings, 0 replies; 4+ messages in thread
From: SF Markus Elfring @ 2017-05-06 16:15 UTC (permalink / raw)
To: b.a.t.m.a.n, netdev, Antonio Quartulli, David S. Miller,
Marek Lindner, Simon Wunderlich
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 6 May 2017 17:57:36 +0200
A bit of text was put into a sequence by two separate function calls.
Print the same data by a single function call instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
net/batman-adv/network-coding.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index e1f6fc72fe3e..3604d7899e2c 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -1935,9 +1935,7 @@ int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset)
list)
seq_printf(seq, "%pM ",
nc_node->addr);
- seq_puts(seq, "\n");
-
- seq_puts(seq, " Outgoing: ");
+ seq_puts(seq, "\n Outgoing: ");
/* For out_nc_node to this orig_node */
list_for_each_entry_rcu(nc_node,
&orig_node->out_coding_list,
--
2.12.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations
2017-05-06 16:12 [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations SF Markus Elfring
2017-05-06 16:14 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace a seq_puts() call by seq_putc() in two functions SF Markus Elfring
2017-05-06 16:15 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text() SF Markus Elfring
@ 2017-05-23 10:14 ` Sven Eckelmann
2 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2017-05-23 10:14 UTC (permalink / raw)
To: b.a.t.m.a.n
Cc: kernel-janitors, Marek Lindner, netdev, Antonio Quartulli, LKML,
David S. Miller, SF Markus Elfring
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
On Samstag, 6. Mai 2017 18:12:46 CEST SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 6 May 2017 18:03:45 +0200
>
> Two update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (2):
> Replace a seq_puts() call by seq_putc() in two functions
> Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text()
Patches applied as 626caae9f257 [1] and 912eeed9f520 [2]
Thanks,
Sven
[1] https://git.open-mesh.org/linux-merge.git/commit/626caae9f25746c39b0a1204f8b8f532c1746f10
[2] https://git.open-mesh.org/linux-merge.git/commit/912eeed9f5208515b75103e91ff8b64cfdcca7b9
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-23 10:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-06 16:12 [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations SF Markus Elfring
2017-05-06 16:14 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Replace a seq_puts() call by seq_putc() in two functions SF Markus Elfring
2017-05-06 16:15 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Combine two seq_puts() calls into one call in batadv_nc_nodes_seq_print_text() SF Markus Elfring
2017-05-23 10:14 ` [B.A.T.M.A.N.] [PATCH 0/2] batman-adv: Fine-tuning for three function implementations Sven Eckelmann
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).