linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions
@ 2020-05-06 23:53 Jacob Keller
  2020-05-06 23:55 ` Jacob Keller
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Keller @ 2020-05-06 23:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jacob Keller, Jakub Kicinski, Andy Whitcroft, Joe Perches

The GENL_SET_ERR_MSG, NL_SET_ERR_MSG, and NL_SET_ERR_MSG_MOD macros are
used to report a string describing a specific error to userspace.

Often, these strings can exceed the normal 80 column limit. However,
just like with strings printed to the kernel log, it is preferred to
keep these on a single line.

Add these macros to the logFunctions exception list in checkpatch.pl

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>
---
Changes since v1:
* add GENL_SET_ERR_MSG to the list
* Reword the commit message slightly

 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index eac40f0abd56..818a5b21587d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -471,6 +471,7 @@ our $logFunctions = qr{(?x:
 	WARN(?:_RATELIMIT|_ONCE|)|
 	panic|
 	MODULE_[A-Z_]+|
+	GENL_SET_ERR_MSG|NL_SET_ERR_MSG|NL_SET_ERR_MSG_MOD|
 	seq_vprintf|seq_printf|seq_puts
 )};
 
-- 
2.25.2


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

* Re: [PATCH v2] checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions
  2020-05-06 23:53 [PATCH v2] checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions Jacob Keller
@ 2020-05-06 23:55 ` Jacob Keller
  0 siblings, 0 replies; 2+ messages in thread
From: Jacob Keller @ 2020-05-06 23:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jakub Kicinski, Andy Whitcroft, Joe Perches



On 5/6/2020 4:53 PM, Jacob Keller wrote:
> The GENL_SET_ERR_MSG, NL_SET_ERR_MSG, and NL_SET_ERR_MSG_MOD macros are
> used to report a string describing a specific error to userspace.
> 
> Often, these strings can exceed the normal 80 column limit. However,
> just like with strings printed to the kernel log, it is preferred to
> keep these on a single line.
> 
> Add these macros to the logFunctions exception list in checkpatch.pl
> 
> 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>

Joe, Jakub,

I will also be sending a patch to fix the newlines in uses of
NL_SET_ERR_MSG_MOD, but since they all appear to be in net drivers, I
think it should go through the netdev list.

Thanks,
Jake

> ---
> Changes since v1:
> * add GENL_SET_ERR_MSG to the list
> * Reword the commit message slightly
> 
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index eac40f0abd56..818a5b21587d 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -471,6 +471,7 @@ our $logFunctions = qr{(?x:
>  	WARN(?:_RATELIMIT|_ONCE|)|
>  	panic|
>  	MODULE_[A-Z_]+|
> +	GENL_SET_ERR_MSG|NL_SET_ERR_MSG|NL_SET_ERR_MSG_MOD|
>  	seq_vprintf|seq_printf|seq_puts
>  )};
>  
> 

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

end of thread, other threads:[~2020-05-06 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 23:53 [PATCH v2] checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions Jacob Keller
2020-05-06 23:55 ` Jacob Keller

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