]> Pileus Git - ~andy/linux/commitdiff
batman-adv: use seq_puts instead of seq_printf when the format is constant
authorAntonio Quartulli <ordex@autistici.org>
Thu, 21 Mar 2013 08:23:29 +0000 (09:23 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 27 Mar 2013 09:29:55 +0000 (10:29 +0100)
As reported by checkpatch, seq_puts has to be preferred with
respect to seq_printf when the format is a constant string
(no va_args)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/gateway_client.c
net/batman-adv/main.c
net/batman-adv/network-coding.c
net/batman-adv/originator.c
net/batman-adv/vis.c

index 34f99a46ec1d142b66ec92314d5f2e7fac35a15c..f105219f4a4b120810973e0ae8cb31a8c4e2aca1 100644 (file)
@@ -500,7 +500,7 @@ int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset)
        rcu_read_unlock();
 
        if (gw_count == 0)
-               seq_printf(seq, "No gateways in range ...\n");
+               seq_puts(seq, "No gateways in range ...\n");
 
 out:
        if (primary_if)
index 62b1f89b7b4d257b1556a3a40042a229047279d2..6277735cd89e33797fdb10662c878490aa6cbb49 100644 (file)
@@ -419,7 +419,7 @@ int batadv_algo_seq_print_text(struct seq_file *seq, void *offset)
 {
        struct batadv_algo_ops *bat_algo_ops;
 
-       seq_printf(seq, "Available routing algorithms:\n");
+       seq_puts(seq, "Available routing algorithms:\n");
 
        hlist_for_each_entry(bat_algo_ops, &batadv_algo_list, list) {
                seq_printf(seq, "%s\n", bat_algo_ops->name);
index 086c107a452e8d293933d42c6215f78af4d095dc..6b9a54485314be35fa76635acb6f2148b6d8b6c0 100644 (file)
@@ -1760,23 +1760,23 @@ int batadv_nc_nodes_seq_print_text(struct seq_file *seq, void *offset)
                hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
                        seq_printf(seq, "Node:      %pM\n", orig_node->orig);
 
-                       seq_printf(seq, " Ingoing:  ");
+                       seq_puts(seq, " Ingoing:  ");
                        /* For each in_nc_node to this orig_node */
                        list_for_each_entry_rcu(nc_node,
                                                &orig_node->in_coding_list,
                                                list)
                                seq_printf(seq, "%pM ",
                                           nc_node->addr);
-                       seq_printf(seq, "\n");
+                       seq_puts(seq, "\n");
 
-                       seq_printf(seq, " Outgoing: ");
+                       seq_puts(seq, " Outgoing: ");
                        /* For out_nc_node to this orig_node */
                        list_for_each_entry_rcu(nc_node,
                                                &orig_node->out_coding_list,
                                                list)
                                seq_printf(seq, "%pM ",
                                           nc_node->addr);
-                       seq_printf(seq, "\n\n");
+                       seq_puts(seq, "\n\n");
                }
                rcu_read_unlock();
        }
index 585e684a380b8c0d70ba69a56f0cb6496cbb41e9..2f3452546636ce71747ef9a8b1a949caae8d8f04 100644 (file)
@@ -465,7 +465,7 @@ int batadv_orig_seq_print_text(struct seq_file *seq, void *offset)
                                           neigh_node_tmp->tq_avg);
                        }
 
-                       seq_printf(seq, "\n");
+                       seq_puts(seq, "\n");
                        batman_count++;
 
 next:
@@ -475,7 +475,7 @@ next:
        }
 
        if (batman_count == 0)
-               seq_printf(seq, "No batman nodes in range ...\n");
+               seq_puts(seq, "No batman nodes in range ...\n");
 
 out:
        if (primary_if)
index c053244b97bd38e03a588c1c629e6081d06b2154..962ccf3b838225f409f9098c358c76a8b129417e 100644 (file)
@@ -149,7 +149,7 @@ static void batadv_vis_data_read_prim_sec(struct seq_file *seq,
 
        hlist_for_each_entry(entry, if_list, list) {
                if (entry->primary)
-                       seq_printf(seq, "PRIMARY, ");
+                       seq_puts(seq, "PRIMARY, ");
                else
                        seq_printf(seq,  "SEC %pM, ", entry->addr);
        }
@@ -207,7 +207,7 @@ static void batadv_vis_data_read_entries(struct seq_file *seq,
                if (batadv_compare_eth(entry->addr, packet->vis_orig))
                        batadv_vis_data_read_prim_sec(seq, list);
 
-               seq_printf(seq, "\n");
+               seq_puts(seq, "\n");
        }
 }