mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jacob Keller <jacob.e.keller@intel.com>, linux-kernel@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>, Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH] checkpatch: add NL_SET_ERR_MSG to 80 column exceptions
Date: Fri, 01 May 2020 16:42:02 -0700	[thread overview]
Message-ID: <e1e12e3f6992c00c005ba2b3bcf671c033a1dccc.camel@perches.com> (raw)
In-Reply-To: <20200501231131.2389319-1-jacob.e.keller@intel.com>

On Fri, 2020-05-01 at 16:11 -0700, Jacob Keller wrote:
> NL_SET_ERR_MSG and NL_SET_ERR_MSG_MOD are used to report extended error
> responses about failure of a netlink command. These strings often end up
> going over the 80-column limit. Just like logging messages, it is
> preferred to leave the message all on a single line.
> 
> Add these to the exception list so that checkpatch.pl will no longer
> complain about the long lines due to use of these macros.
> 
> 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>
> ---
>  scripts/checkpatch.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index eac40f0abd56..5da3b06fbeaa 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -471,7 +471,8 @@ our $logFunctions = qr{(?x:
>  	WARN(?:_RATELIMIT|_ONCE|)|
>  	panic|
>  	MODULE_[A-Z_]+|
> -	seq_vprintf|seq_printf|seq_puts
> +	seq_vprintf|seq_printf|seq_puts|
> +	NL_SET_ERR_MSG(?:_MOD)?
>  )};
>  
>  our $allocFunctions = qr{(?x:

<shrug>  OK I guess.

What about GENL_SET_ERR_MSG ?

btw:

There are some uses with what appear to be unnecessary newlines.
Maybe these newlines should be removed.

drivers/net/ethernet/mscc/ocelot_tc.c:50:			NL_SET_ERR_MSG_MOD(extack,
					   "Only one policer per port is supported\n");
drivers/net/ethernet/mscc/ocelot_tc.c:61:			NL_SET_ERR_MSG_MOD(extack, "Could not add policer\n");
drivers/net/ethernet/mscc/ocelot_tc.c:74:			NL_SET_ERR_MSG_MOD(extack,
					   "Could not delete policer\n");
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:1099:			NL_SET_ERR_MSG_MOD(extack,
					   "Failed to create tc offload table\n");
net/dsa/slave.c:915:		NL_SET_ERR_MSG_MOD(extack,
				   "Policing offload not implemented\n");
net/dsa/slave.c:920:		NL_SET_ERR_MSG_MOD(extack,
				   "Only supported on ingress qdisc\n");
net/dsa/slave.c:930:			NL_SET_ERR_MSG_MOD(extack,
					   "Only one port policer allowed\n");
net/bridge/br_stp_if.c:205:		NL_SET_ERR_MSG_MOD(extack,
				   "STP can't be enabled if MRP is already enabled\n");
net/bridge/br_mrp_netlink.c:31:		NL_SET_ERR_MSG_MOD(extack, "MRP can't be enabled if STP is already enabled\n");



  reply	other threads:[~2020-05-01 23:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 23:11 Jacob Keller
2020-05-01 23:42 ` Joe Perches [this message]
2020-05-02  0:19   ` Jacob Keller
2020-05-02  0:30     ` Joe Perches
2020-05-02  0:36       ` Keller, Jacob E
2020-05-02  1:04         ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1e12e3f6992c00c005ba2b3bcf671c033a1dccc.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®