Commit 0c81465357ffe29da9ff20103afe4a59908e0d30

Authored by Antonio Quartulli
1 parent 9cb812c54e

batman-adv: use seq_puts instead of seq_printf when the format is constant

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>

Showing 5 changed files with 10 additions and 10 deletions Side-by-side Diff

net/batman-adv/gateway_client.c
... ... @@ -500,7 +500,7 @@
500 500 rcu_read_unlock();
501 501  
502 502 if (gw_count == 0)
503   - seq_printf(seq, "No gateways in range ...\n");
  503 + seq_puts(seq, "No gateways in range ...\n");
504 504  
505 505 out:
506 506 if (primary_if)
net/batman-adv/main.c
... ... @@ -419,7 +419,7 @@
419 419 {
420 420 struct batadv_algo_ops *bat_algo_ops;
421 421  
422   - seq_printf(seq, "Available routing algorithms:\n");
  422 + seq_puts(seq, "Available routing algorithms:\n");
423 423  
424 424 hlist_for_each_entry(bat_algo_ops, &batadv_algo_list, list) {
425 425 seq_printf(seq, "%s\n", bat_algo_ops->name);
net/batman-adv/network-coding.c
... ... @@ -1760,23 +1760,23 @@
1760 1760 hlist_for_each_entry_rcu(orig_node, head, hash_entry) {
1761 1761 seq_printf(seq, "Node: %pM\n", orig_node->orig);
1762 1762  
1763   - seq_printf(seq, " Ingoing: ");
  1763 + seq_puts(seq, " Ingoing: ");
1764 1764 /* For each in_nc_node to this orig_node */
1765 1765 list_for_each_entry_rcu(nc_node,
1766 1766 &orig_node->in_coding_list,
1767 1767 list)
1768 1768 seq_printf(seq, "%pM ",
1769 1769 nc_node->addr);
1770   - seq_printf(seq, "\n");
  1770 + seq_puts(seq, "\n");
1771 1771  
1772   - seq_printf(seq, " Outgoing: ");
  1772 + seq_puts(seq, " Outgoing: ");
1773 1773 /* For out_nc_node to this orig_node */
1774 1774 list_for_each_entry_rcu(nc_node,
1775 1775 &orig_node->out_coding_list,
1776 1776 list)
1777 1777 seq_printf(seq, "%pM ",
1778 1778 nc_node->addr);
1779   - seq_printf(seq, "\n\n");
  1779 + seq_puts(seq, "\n\n");
1780 1780 }
1781 1781 rcu_read_unlock();
1782 1782 }
net/batman-adv/originator.c
... ... @@ -465,7 +465,7 @@
465 465 neigh_node_tmp->tq_avg);
466 466 }
467 467  
468   - seq_printf(seq, "\n");
  468 + seq_puts(seq, "\n");
469 469 batman_count++;
470 470  
471 471 next:
... ... @@ -475,7 +475,7 @@
475 475 }
476 476  
477 477 if (batman_count == 0)
478   - seq_printf(seq, "No batman nodes in range ...\n");
  478 + seq_puts(seq, "No batman nodes in range ...\n");
479 479  
480 480 out:
481 481 if (primary_if)
net/batman-adv/vis.c
... ... @@ -149,7 +149,7 @@
149 149  
150 150 hlist_for_each_entry(entry, if_list, list) {
151 151 if (entry->primary)
152   - seq_printf(seq, "PRIMARY, ");
  152 + seq_puts(seq, "PRIMARY, ");
153 153 else
154 154 seq_printf(seq, "SEC %pM, ", entry->addr);
155 155 }
... ... @@ -207,7 +207,7 @@
207 207 if (batadv_compare_eth(entry->addr, packet->vis_orig))
208 208 batadv_vis_data_read_prim_sec(seq, list);
209 209  
210   - seq_printf(seq, "\n");
  210 + seq_puts(seq, "\n");
211 211 }
212 212 }
213 213