Skip to content

seq_file: Remove return checks of seq_printf()

Steven Rostedt cluster-devel lkml netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8seq_file: Rename seq_overflow() to seq_has_overflowed() and make publicDocumentation/filesystems/seq_file.txt fs/seq_file.c include/linux/seq_file.h+30 -228 replies
2/8netfilter: Remove return values for print_conntrack callbacksinclude/net/netfilter/nf_conntrack_l4proto.h net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c net/netfilter/nf_conntrack_proto_dccp.c +4 more+17 -1412 replies
3/8netfilter: Convert print_tuple functions to return voidinclude/net/netfilter/nf_conntrack_core.h include/net/netfilter/nf_conntrack_l3proto.h include/net/netfilter/nf_conntrack_l4proto.h +14 more+70 -692 replies
4/8netfilter: Remove checks of seq_printf() return valuesnet/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c net/netfilter/nf_conntrack_standalone.c net/netfilter/nf_log.c +3 more+97 -971 reply
5/8dlm: Remove seq_printf() return checks and use seq_has_overflowed()fs/dlm/debug_fs.c+117 -1342 replies
6/8dlm: Use seq_puts() instead of seq_printf() for constant stringsfs/dlm/debug_fs.c+5 -71 reply
7/8fs: Convert show_fdinfo functions to voidDocumentation/filesystems/vfs.txt drivers/net/tun.c fs/eventfd.c +7 more+63 -830 replies
8/8debugfs: Have debugfs_print_regs32() return voidDocumentation/filesystems/debugfs.txt fs/debugfs/file.c include/linux/debugfs.h+12 -122 replies

Reviews trailers per patch

2 of 8 patches have a Reviewed-by or Acked-by.

PatchGreg Kroah-HartmanPablo Neira Ayuso
1/8
2/8A-b
3/8
4/8
5/8
6/8
7/8
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFA][PATCH 0/8] seq_file: Remove return checks of seq_printf()

[ REQUEST FOR ACKS ]

I'm looking to clean up the seq_file code and to eventually merge the trace_seq code with seq_file as well, since they basically do the same thing.

Part of this process is to remove the return code of seq_printf() and friends as they are rather inconsistent. It is better to use the new function seq_has_overflowed() if you want to stop processing when the buffer is full. Note, if the buffer is full, the seq_file code will throw away the contents, allocate a bigger buffer, and then call your code again to fill in the data. The only thing that breaking out of the function early does is to save a little time which is probably never noticed.

But anyway, I'm asking for Acked-bys for code that touches the subsystems that have been modified.

I started with patches from Joe Perches and modified them as well. There's many more places that need to be updated before we can convert seq_printf() and friends to return void. But this patch set introduces the seq_has_overflowed() and does some initial updates.

Please ack!

Thanks!

-- Steve

Joe Perches (6):
seq_file: Rename seq_overflow() to seq_has_overflowed() and make public
netfilter: Convert print_tuple functions to return void
dlm: Remove seq_printf() return checks and use seq_has_overflowed()
dlm: Use seq_puts() instead of seq_printf() for constant strings
fs: Convert show_fdinfo functions to void
debugfs: Have debugfs_print_regs32() return void

Steven Rostedt (Red Hat) (2):
netfilter: Remove return values for print_conntrack callbacks
netfilter: Remove checks of seq_printf() return values

----

 Documentation/filesystems/debugfs.txt              |   2 +-
 Documentation/filesystems/seq_file.txt             |  22 +-
 Documentation/filesystems/vfs.txt                  |   2 +-
 drivers/net/tun.c                                  |   4 +-
 fs/debugfs/file.c                                  |  15 +-
 fs/dlm/debug_fs.c                                  | 263 ++++++++++-----------
 fs/eventfd.c                                       |   9 +-
 fs/eventpoll.c                                     |  13 +-
 fs/notify/fdinfo.c                                 |  78 +++---
 fs/notify/fdinfo.h                                 |   4 +-
 fs/proc/fd.c                                       |   3 +-
 fs/seq_file.c                                      |  15 +-
 fs/signalfd.c                                      |   4 +-
 fs/timerfd.c                                       |  27 ++-
 include/linux/debugfs.h                            |   7 +-
 include/linux/fs.h                                 |   2 +-
 include/linux/seq_file.h                           |  15 ++
 include/net/netfilter/nf_conntrack_core.h          |   2 +-
 include/net/netfilter/nf_conntrack_l3proto.h       |   4 +-
 include/net/netfilter/nf_conntrack_l4proto.h       |   6 +-
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c     |   6 +-
 .../netfilter/nf_conntrack_l3proto_ipv4_compat.c   |  53 +++--
 net/ipv4/netfilter/nf_conntrack_proto_icmp.c       |  10 +-
 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c     |   6 +-
 net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c     |  10 +-
 net/netfilter/nf_conntrack_l3proto_generic.c       |   5 +-
 net/netfilter/nf_conntrack_proto_dccp.c            |  14 +-
 net/netfilter/nf_conntrack_proto_generic.c         |   5 +-
 net/netfilter/nf_conntrack_proto_gre.c             |  18 +-
 net/netfilter/nf_conntrack_proto_sctp.c            |  14 +-
 net/netfilter/nf_conntrack_proto_tcp.c             |  14 +-
 net/netfilter/nf_conntrack_proto_udp.c             |  10 +-
 net/netfilter/nf_conntrack_proto_udplite.c         |  10 +-
 net/netfilter/nf_conntrack_standalone.c            |  77 +++---
 net/netfilter/nf_log.c                             |  30 +--
 net/netfilter/nfnetlink_queue_core.c               |  13 +-
 net/netfilter/x_tables.c                           |  19 +-
 net/netfilter/xt_hashlimit.c                       |  36 ++-
 38 files changed, 410 insertions(+), 437 deletions(-)