aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-11-04 18:37:03 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-05 22:04:55 -0500
commit1744bea1fa382f67263fdd9fee51d603fddb3da6 (patch)
treefa9d428d35a2c18571ccfecdf4bb8c3349cddef8
parente5a2c899957659cd1a9f789bc462f9c0b35f5150 (diff)
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: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/igmp.c6
-rw-r--r--net/ipv6/ip6_flowlabel.c3
-rw-r--r--net/ipv6/mcast.c6
3 files changed, 3 insertions, 12 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 3f8051358202..1e4adae2bde0 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2687,11 +2687,7 @@ static int igmp_mcf_seq_show(struct seq_file *seq, void *v)
2687 struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq); 2687 struct igmp_mcf_iter_state *state = igmp_mcf_seq_private(seq);
2688 2688
2689 if (v == SEQ_START_TOKEN) { 2689 if (v == SEQ_START_TOKEN) {
2690 seq_printf(seq, 2690 seq_puts(seq, "Idx Device MCA SRC INC EXC\n");
2691 "%3s %6s "
2692 "%10s %10s %6s %6s\n", "Idx",
2693 "Device", "MCA",
2694 "SRC", "INC", "EXC");
2695 } else { 2691 } else {
2696 seq_printf(seq, 2692 seq_printf(seq,
2697 "%3d %6.6s 0x%08x " 2693 "%3d %6.6s 0x%08x "
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index c14343715049..7221021b2d97 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -770,8 +770,7 @@ static int ip6fl_seq_show(struct seq_file *seq, void *v)
770{ 770{
771 struct ip6fl_iter_state *state = ip6fl_seq_private(seq); 771 struct ip6fl_iter_state *state = ip6fl_seq_private(seq);
772 if (v == SEQ_START_TOKEN) { 772 if (v == SEQ_START_TOKEN) {
773 seq_printf(seq, "%-5s %-1s %-6s %-6s %-6s %-8s %-32s %s\n", 773 seq_puts(seq, "Label S Owner Users Linger Expires Dst Opt\n");
774 "Label", "S", "Owner", "Users", "Linger", "Expires", "Dst", "Opt");
775 } else { 774 } else {
776 struct ip6_flowlabel *fl = v; 775 struct ip6_flowlabel *fl = v;
777 seq_printf(seq, 776 seq_printf(seq,
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 9648de2b6745..e04f184b783a 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2823,11 +2823,7 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v)
2823 struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); 2823 struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq);
2824 2824
2825 if (v == SEQ_START_TOKEN) { 2825 if (v == SEQ_START_TOKEN) {
2826 seq_printf(seq, 2826 seq_puts(seq, "Idx Device Multicast Address Source Address INC EXC\n");
2827 "%3s %6s "
2828 "%32s %32s %6s %6s\n", "Idx",
2829 "Device", "Multicast Address",
2830 "Source Address", "INC", "EXC");
2831 } else { 2827 } else {
2832 seq_printf(seq, 2828 seq_printf(seq,
2833 "%3d %6.6s %pi6 %pi6 %6lu %6lu\n", 2829 "%3d %6.6s %pi6 %pi6 %6lu %6lu\n",