Commit 1744bea1 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net: Convert SEQ_START_TOKEN/seq_printf to seq_puts

Using a single fixed string is smaller code size than using
a format and many string arguments.

Reduces overall code size a little.

$ size net/ipv4/igmp.o* net/ipv6/mcast.o* net/ipv6/ip6_flowlabel.o*
   text	   data	    bss	    dec	    hex	filename
  34269	   7012	  14824	  56105	   db29	net/ipv4/igmp.o.new
  34315	   7012	  14824	  56151	   db57	net/ipv4/igmp.o.old
  30078	   7869	  13200	  51147	   c7cb	net/ipv6/mcast.o.new
  30105	   7869	  13200	  51174	   c7e6	net/ipv6/mcast.o.old
  11434	   3748	   8580	  23762	   5cd2	net/ipv6/ip6_flowlabel.o.new
  11491	   3748	   8580	  23819	   5d0b	net/ipv6/ip6_flowlabel.o.old
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5a2c899
...@@ -2687,11 +2687,7 @@ static int igmp_mcf_seq_show(struct seq_file *seq, void *v) ...@@ -2687,11 +2687,7 @@ static int igmp_mcf_seq_show(struct seq_file *seq, void *v)
struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq); struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq);
if (v == SEQ_START_TOKEN) { if (v == SEQ_START_TOKEN) {
seq_printf(seq, seq_puts(seq, "Idx Device MCA SRC INC EXC\n");
"%3s %6s "
"%10s %10s %6s %6s\n", "Idx",
"Device", "MCA",
"SRC", "INC", "EXC");
} else { } else {
seq_printf(seq, seq_printf(seq,
"%3d %6.6s 0x%08x " "%3d %6.6s 0x%08x "
......
...@@ -770,8 +770,7 @@ static int ip6fl_seq_show(struct seq_file *seq, void *v) ...@@ -770,8 +770,7 @@ static int ip6fl_seq_show(struct seq_file *seq, void *v)
{ {
struct ip6fl_iter_state *state = ip6fl_seq_private(seq); struct ip6fl_iter_state *state = ip6fl_seq_private(seq);
if (v == SEQ_START_TOKEN) { if (v == SEQ_START_TOKEN) {
seq_printf(seq, "%-5s %-1s %-6s %-6s %-6s %-8s %-32s %s\n", seq_puts(seq, "Label S Owner Users Linger Expires Dst Opt\n");
"Label", "S", "Owner", "Users", "Linger", "Expires", "Dst", "Opt");
} else { } else {
struct ip6_flowlabel *fl = v; struct ip6_flowlabel *fl = v;
seq_printf(seq, seq_printf(seq,
......
...@@ -2823,11 +2823,7 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v) ...@@ -2823,11 +2823,7 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v)
struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq);
if (v == SEQ_START_TOKEN) { if (v == SEQ_START_TOKEN) {
seq_printf(seq, seq_puts(seq, "Idx Device Multicast Address Source Address INC EXC\n");
"%3s %6s "
"%32s %32s %6s %6s\n", "Idx",
"Device", "Multicast Address",
"Source Address", "INC", "EXC");
} else { } else {
seq_printf(seq, seq_printf(seq,
"%3d %6.6s %pi6 %pi6 %6lu %6lu\n", "%3d %6.6s %pi6 %pi6 %6lu %6lu\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment