checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions
PATCH v2 1/1 checkpatch: add GENL_SET_ERR_MSG et al. to 80 column exceptions
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
---
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(+)
scripts/checkpatch.pl +1 -0
@@ -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 )};
Signature · 1 line
2.25.2
Quoted 7 lines · Jacob Keller
The
GENL_SET_ERR_MSG,NL_SET_ERR_MSG, andNL_SET_ERR_MSG_MODmacros 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.
Quoted 6 lines
Add these macros to the logFunctions exception list in checkpatch.pl
Signed-off-by Jacob Keller <[email protected]>Cc Jakub Kicinski <[email protected]>Cc Andy Whitcroft <[email protected]>Cc Joe Perches <[email protected]>
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
Quoted 21 lines
---
Changes since v1:
* addGENL_SET_ERR_MSGto the list
* Reword the commit message slightlyscripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)scripts/checkpatch.pl +1
-0@@ -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 )};