net: remove newlines in NL_SET_ERR_MSG_MOD
The NL_SET_ERR_MSG_MOD macro is used to report a string describing an error message to userspace via the netlink extended ACK structure. It should not have a trailing newline. Add a cocci script which catches cases where the newline marker is present. Using this script, fix the handful of cases which accidentally included a trailing new line. I couldn't figure out a way to get a patch mode working, so this script only implements context, report, and org. Signed-off-by:Jacob Keller <jacob.e.keller@intel.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 1 addition, 1 deletiondrivers/net/ethernet/mellanox/mlx5/core/en_tc.c
- drivers/net/ethernet/mscc/ocelot_tc.c 3 additions, 3 deletionsdrivers/net/ethernet/mscc/ocelot_tc.c
- net/bridge/br_mrp_netlink.c 1 addition, 1 deletionnet/bridge/br_mrp_netlink.c
- net/bridge/br_stp_if.c 1 addition, 1 deletionnet/bridge/br_stp_if.c
- net/dsa/slave.c 3 additions, 3 deletionsnet/dsa/slave.c
- scripts/coccinelle/misc/newline_in_nl_msg.cocci 75 additions, 0 deletionsscripts/coccinelle/misc/newline_in_nl_msg.cocci
Loading
Please register or sign in to comment