netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/3] seq_printf/puts/putc: Start to convert to return void
@ 2013-12-11  5:12 Joe Perches
       [not found] ` <cover.1386738050.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Joe Perches @ 2013-12-11  5:12 UTC (permalink / raw)
  To: Alexander Viro
  Cc: Kees Cook, linux-fsdevel, linux-kernel, netfilter-devel,
	netfilter, coreteam, netdev, b.a.t.m.a.n

Many uses of the return value of seq_printf/seq_puts/seq_putc are
incorrect.  Many assume that the return value is the number of
chars emitted into a buffer like printf/puts/putc.

It would be better to make the return value of these functions void
to avoid these misuses.

Start to do so.
Convert seq_overflow to a public function from a static function.

Remove the return uses of seq_printf/seq_puts/seq_putc from net.
Add a seq_overflow function call instead.

Joe Perches (3):
  seq: Add a seq_overflow test.
  batman-adv: Use seq_overflow
  netfilter: Use seq_overflow

 fs/seq_file.c                                      | 15 ++++----
 include/linux/seq_file.h                           |  2 +
 include/net/netfilter/nf_conntrack_acct.h          |  3 +-
 net/batman-adv/gateway_client.c                    | 25 ++++++------
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c     |  6 ++-
 .../netfilter/nf_conntrack_l3proto_ipv4_compat.c   | 42 +++++++++++++--------
 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c     |  6 ++-
 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c     | 10 +++--
 net/netfilter/nf_conntrack_acct.c                  | 11 +++---
 net/netfilter/nf_conntrack_expect.c                |  4 +-
 net/netfilter/nf_conntrack_proto_dccp.c            | 12 ++++--
 net/netfilter/nf_conntrack_proto_gre.c             | 15 +++++---
 net/netfilter/nf_conntrack_proto_sctp.c            | 12 ++++--
 net/netfilter/nf_conntrack_proto_tcp.c             | 11 ++++--
 net/netfilter/nf_conntrack_proto_udp.c             |  7 ++--
 net/netfilter/nf_conntrack_proto_udplite.c         |  7 ++--
 net/netfilter/nf_conntrack_standalone.c            | 44 +++++++++++++---------
 net/netfilter/nf_log.c                             | 26 ++++++-------
 net/netfilter/nfnetlink_log.c                      | 12 +++---
 net/netfilter/nfnetlink_queue_core.c               | 14 ++++---
 net/netfilter/x_tables.c                           |  8 ++--
 net/netfilter/xt_hashlimit.c                       | 34 +++++++++--------
 22 files changed, 191 insertions(+), 135 deletions(-)

-- 
1.8.1.2.459.gbcd45b4.dirty


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-12-11  8:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11  5:12 [PATCH -next 0/3] seq_printf/puts/putc: Start to convert to return void Joe Perches
     [not found] ` <cover.1386738050.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2013-12-11  5:12   ` [PATCH -next 2/3] batman-adv: Use seq_overflow Joe Perches
     [not found]     ` <e7104b35287b1e1ec456734c1b5e1aa98dac99f8.1386738050.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2013-12-11  7:26       ` Antonio Quartulli
     [not found]         ` <52A813C1.8070404-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
2013-12-11  7:31           ` Antonio Quartulli
     [not found]             ` <52A814D7.1060805-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
2013-12-11  7:58               ` Al Viro
2013-12-11  7:55       ` Al Viro
     [not found]         ` <20131211075526.GR10323-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2013-12-11  8:05           ` Al Viro
     [not found]             ` <20131211080504.GT10323-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2013-12-11  8:26               ` Joe Perches
2013-12-11  8:38                 ` Al Viro
2013-12-11  5:12 ` [PATCH -next 3/3] netfilter: " Joe Perches
2013-12-11  8:17   ` Al Viro
2013-12-11  5:20 ` [PATCH -next 0/3] seq_printf/puts/putc: Start to convert to return void David Miller

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).