All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/29] l2tp: cleanup checkpatch.pl warnings
@ 2020-07-21 17:31 Tom Parkin
  2020-07-21 17:31 ` [PATCH 01/29] l2tp: cleanup whitespace around operators Tom Parkin
                   ` (29 more replies)
  0 siblings, 30 replies; 38+ messages in thread
From: Tom Parkin @ 2020-07-21 17:31 UTC (permalink / raw)
  To: netdev; +Cc: Tom Parkin

l2tp hasn't been kept up to date with the static analysis checks offered
by checkpatch.pl.

This patchset makes l2tp checkpatch-clean, with some exceptions as
described below.

The majority of these issues are trivial: for example small whitespace
tweaks, comment style, line breaks and indentation.  The first patches
in the series deal with these.

The more substantive patches fall into two categories:

 * Some rearrangement of code to better deal with CONFIG_IPV6 ifdefs,
   thereby avoiding checkpatch warnings.

 * Removal of BUG_ON in l2tp.  Some uses of BUG_ON offered little or no
   benefit in the current codebase: these have been removed.  Others do
   help to flag an unexpected condition; and these have been replaced
   with a WARN_ON and appropriate recovery code.

The following checkpatch warnings are not addressed:

 * Two line length warnings for lines of 103 and 101 characters.  These
   lines are more readable without a linebreak so I prefer to leave them
   as-is.

 * Two warnings about unbalanced braces around an else statement in
   l2tp_core.c.  These result from conditionally-compiled code providing
   IPv6 support.  In other areas I have resolved similar warnings by
   breaking code out into functions, but in these remaining cases it'd
   be more difficult to do this without significant modifications to the
   code.  For this patchset at least I prefer to not make such invasive
   changes.

 * Two warnings about use of ENOSYS in l2tp_ppp.c.  This error code is
   returned when session-specific ioctl calls are made on a tunnel socket.
   Arguably a different code would be more appropriate; however changing
   this could be seen to be changing the userspace API.  It's unlikely
   that any code is relying on this particular error being returned in
   this scenario, but again, I prefer not to make such a change in this
   patchset.

Tom Parkin (29):
  l2tp: cleanup whitespace around operators
  l2tp: tweak comment style for consistency
  l2tp: add a blank line following declarations
  l2tp: cleanup excessive blank lines
  l2tp: cleanup difficult-to-read line breaks
  l2tp: cleanup wonky alignment of line-broken function calls
  l2tp: cleanup suspect code indent
  l2tp: add identifier name in function pointer prototype
  l2tp: prefer using BIT macro
  l2tp: cleanup comparisons to NULL
  l2tp: cleanup unnecessary braces in if statements
  l2tp: prefer seq_puts for unformatted output
  l2tp: avoid multiple assignments
  l2tp: line-break long function prototypes
  l2tp: comment per net spinlock instances
  l2tp: fix up incorrect comment in l2tp_recv_common
  l2tp: avoid precidence issues in L2TP_SKB_CB macro
  l2tp: WARN_ON rather than BUG_ON in l2tp_debugfs.c
  l2tp: use a function to render tunnel address in l2tp_debugfs
  l2tp: cleanup netlink send of tunnel address information
  l2tp: cleanup netlink tunnel create address handling
  l2tp: cleanup kzalloc calls
  l2tp: remove BUG_ON in l2tp_session_queue_purge
  l2tp: remove BUG_ON in l2tp_tunnel_closeall
  l2tp: don't BUG_ON session magic checks in l2tp_ppp
  l2tp: don't BUG_ON seqfile checks in l2tp_ppp
  l2tp: WARN_ON rather than BUG_ON in l2tp_session_queue_purge
  l2tp: remove BUG_ON refcount value in l2tp_session_free
  l2tp: WARN_ON rather than BUG_ON in l2tp_session_free

 net/l2tp/l2tp_core.c    | 123 +++++++++----------
 net/l2tp/l2tp_core.h    |  82 ++++++-------
 net/l2tp/l2tp_debugfs.c |  66 ++++++-----
 net/l2tp/l2tp_eth.c     |  19 ++-
 net/l2tp/l2tp_ip.c      |  31 +++--
 net/l2tp/l2tp_ip6.c     |  37 +++---
 net/l2tp/l2tp_netlink.c | 257 +++++++++++++++++++++-------------------
 net/l2tp/l2tp_ppp.c     |  97 ++++++++-------
 8 files changed, 362 insertions(+), 350 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-07-28 19:31 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 17:31 [PATCH net-next 00/29] l2tp: cleanup checkpatch.pl warnings Tom Parkin
2020-07-21 17:31 ` [PATCH 01/29] l2tp: cleanup whitespace around operators Tom Parkin
2020-07-21 17:31 ` [PATCH 02/29] l2tp: tweak comment style for consistency Tom Parkin
2020-07-21 17:31 ` [PATCH 03/29] l2tp: add a blank line following declarations Tom Parkin
2020-07-21 17:31 ` [PATCH 04/29] l2tp: cleanup excessive blank lines Tom Parkin
2020-07-21 17:31 ` [PATCH 05/29] l2tp: cleanup difficult-to-read line breaks Tom Parkin
2020-07-21 20:59   ` Jakub Kicinski
2020-07-21 23:26     ` David Miller
2020-07-22  9:06     ` Tom Parkin
2020-07-21 17:31 ` [PATCH 06/29] l2tp: cleanup wonky alignment of line-broken function calls Tom Parkin
2020-07-21 17:31 ` [PATCH 07/29] l2tp: cleanup suspect code indent Tom Parkin
2020-07-21 17:32 ` [PATCH 08/29] l2tp: add identifier name in function pointer prototype Tom Parkin
2020-07-21 17:32 ` [PATCH 09/29] l2tp: prefer using BIT macro Tom Parkin
2020-07-21 17:32 ` [PATCH 10/29] l2tp: cleanup comparisons to NULL Tom Parkin
2020-07-21 17:32 ` [PATCH 11/29] l2tp: cleanup unnecessary braces in if statements Tom Parkin
2020-07-21 17:32 ` [PATCH 12/29] l2tp: prefer seq_puts for unformatted output Tom Parkin
2020-07-21 17:32 ` [PATCH 13/29] l2tp: avoid multiple assignments Tom Parkin
2020-07-21 17:32 ` [PATCH 14/29] l2tp: line-break long function prototypes Tom Parkin
2020-07-21 17:32 ` [PATCH 15/29] l2tp: comment per net spinlock instances Tom Parkin
2020-07-21 17:32 ` [PATCH 16/29] l2tp: fix up incorrect comment in l2tp_recv_common Tom Parkin
2020-07-21 17:32 ` [PATCH 17/29] l2tp: avoid precidence issues in L2TP_SKB_CB macro Tom Parkin
2020-07-28 16:21   ` Joe Perches
2020-07-28 18:08     ` Joe Perches
2020-07-28 19:31       ` Tom Parkin
2020-07-21 17:32 ` [PATCH 18/29] l2tp: WARN_ON rather than BUG_ON in l2tp_debugfs.c Tom Parkin
2020-07-21 17:32 ` [PATCH 19/29] l2tp: use a function to render tunnel address in l2tp_debugfs Tom Parkin
2020-07-21 17:32 ` [PATCH 20/29] l2tp: cleanup netlink send of tunnel address information Tom Parkin
2020-07-21 17:32 ` [PATCH 21/29] l2tp: cleanup netlink tunnel create address handling Tom Parkin
2020-07-21 17:32 ` [PATCH 22/29] l2tp: cleanup kzalloc calls Tom Parkin
2020-07-21 17:32 ` [PATCH 23/29] l2tp: remove BUG_ON in l2tp_session_queue_purge Tom Parkin
2020-07-21 17:32 ` [PATCH 24/29] l2tp: remove BUG_ON in l2tp_tunnel_closeall Tom Parkin
2020-07-21 17:32 ` [PATCH 25/29] l2tp: don't BUG_ON session magic checks in l2tp_ppp Tom Parkin
2020-07-21 17:32 ` [PATCH 26/29] l2tp: don't BUG_ON seqfile " Tom Parkin
2020-07-21 17:32 ` [PATCH 27/29] l2tp: WARN_ON rather than BUG_ON in l2tp_session_queue_purge Tom Parkin
2020-07-21 17:32 ` [PATCH 28/29] l2tp: remove BUG_ON refcount value in l2tp_session_free Tom Parkin
2020-07-21 17:32 ` [PATCH 29/29] l2tp: WARN_ON rather than BUG_ON " Tom Parkin
2020-07-21 23:19 ` [PATCH net-next 00/29] l2tp: cleanup checkpatch.pl warnings David Miller
2020-07-22  9:07   ` Tom Parkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.