* [PATCH] checkpatch: Adjust regular expressions in $logFunctions
@ 2017-05-09 19:00 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-09 19:00 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 9 May 2017 20:40:51 +0200
* Two alternations contained an empty element. Use the question mark
metacharacter instead to express optional items in the search pattern.
* Some alternation elements shared a common prefix (like an underscore).
Improve the specification of this detail by more non-capturing groups.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
scripts/checkpatch.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4b9569fa931b..8561de02d9b8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -427,12 +427,12 @@ our $typeTypedefs = qr{(?x:
our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
our $logFunctions = qr{(?x:
- printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
- (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
- WARN(?:_RATELIMIT|_ONCE|)|
+ printk(?:_(?:ratelimited|once|deferred(?:_once)?))?|
+ (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_(?:ratelimited|once))?|
+ WARN(?:_(?:RATELIMIT|ONCE))?|
panic|
MODULE_[A-Z_]+|
- seq_vprintf|seq_printf|seq_puts
+ seq_(?:v?printf|puts)
)};
our $signature_tags = qr{(?xi:
--
2.12.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] checkpatch: Adjust regular expressions in $logFunctions
@ 2017-05-09 19:00 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-09 19:00 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 9 May 2017 20:40:51 +0200
* Two alternations contained an empty element. Use the question mark
metacharacter instead to express optional items in the search pattern.
* Some alternation elements shared a common prefix (like an underscore).
Improve the specification of this detail by more non-capturing groups.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
scripts/checkpatch.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4b9569fa931b..8561de02d9b8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -427,12 +427,12 @@ our $typeTypedefs = qr{(?x:
our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
our $logFunctions = qr{(?x:
- printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
- (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
- WARN(?:_RATELIMIT|_ONCE|)|
+ printk(?:_(?:ratelimited|once|deferred(?:_once)?))?|
+ (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_(?:ratelimited|once))?|
+ WARN(?:_(?:RATELIMIT|ONCE))?|
panic|
MODULE_[A-Z_]+|
- seq_vprintf|seq_printf|seq_puts
+ seq_(?:v?printf|puts)
)};
our $signature_tags = qr{(?xi:
--
2.12.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] checkpatch: Adjust regular expressions in $logFunctions
2017-05-09 19:00 ` SF Markus Elfring
@ 2017-05-09 20:52 ` Joe Perches
-1 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2017-05-09 20:52 UTC (permalink / raw)
To: SF Markus Elfring, Andy Whitcroft; +Cc: LKML, kernel-janitors
On Tue, 2017-05-09 at 21:00 +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 9 May 2017 20:40:51 +0200
>
> * Two alternations contained an empty element. Use the question mark
> metacharacter instead to express optional items in the search pattern.
>
> * Some alternation elements shared a common prefix (like an underscore).
> Improve the specification of this detail by more non-capturing groups.
No thanks. Perl is odd enough already adding more non-capture
groups when the arguments are clearly specified is harder to read.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] checkpatch: Adjust regular expressions in $logFunctions
@ 2017-05-09 20:52 ` Joe Perches
0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2017-05-09 20:52 UTC (permalink / raw)
To: SF Markus Elfring, Andy Whitcroft; +Cc: LKML, kernel-janitors
On Tue, 2017-05-09 at 21:00 +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 9 May 2017 20:40:51 +0200
>
> * Two alternations contained an empty element. Use the question mark
> metacharacter instead to express optional items in the search pattern.
>
> * Some alternation elements shared a common prefix (like an underscore).
> Improve the specification of this detail by more non-capturing groups.
No thanks. Perl is odd enough already adding more non-capture
groups when the arguments are clearly specified is harder to read.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: checkpatch: Adjust regular expressions in $logFunctions
2017-05-09 20:52 ` Joe Perches
@ 2017-05-09 21:01 ` SF Markus Elfring
-1 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-09 21:01 UTC (permalink / raw)
To: Joe Perches; +Cc: Andy Whitcroft, LKML, kernel-janitors
> Perl is odd enough already adding more non-capture groups
> when the arguments are clearly specified is harder to read.
How do you think about to reformat the affected alternations?
Will it become appropriate to give each element a separate line there?
Regards,
Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: checkpatch: Adjust regular expressions in $logFunctions
@ 2017-05-09 21:01 ` SF Markus Elfring
0 siblings, 0 replies; 8+ messages in thread
From: SF Markus Elfring @ 2017-05-09 21:01 UTC (permalink / raw)
To: Joe Perches; +Cc: Andy Whitcroft, LKML, kernel-janitors
> Perl is odd enough already adding more non-capture groups
> when the arguments are clearly specified is harder to read.
How do you think about to reformat the affected alternations?
Will it become appropriate to give each element a separate line there?
Regards,
Markus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: checkpatch: Adjust regular expressions in $logFunctions
2017-05-09 21:01 ` SF Markus Elfring
@ 2017-05-09 21:16 ` Joe Perches
-1 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2017-05-09 21:16 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: Andy Whitcroft, LKML, kernel-janitors
On Tue, 2017-05-09 at 23:01 +0200, SF Markus Elfring wrote:
> > Perl is odd enough already adding more non-capture groups
> > when the arguments are clearly specified is harder to read.
>
> How do you think about to reformat the affected alternations?
> Will it become appropriate to give each element a separate line there?
I have no interest in changing checkpatch for no value.
_maybe_, breaking up the file into separate tests in
multiple files _could_ be useful.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: checkpatch: Adjust regular expressions in $logFunctions
@ 2017-05-09 21:16 ` Joe Perches
0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2017-05-09 21:16 UTC (permalink / raw)
To: SF Markus Elfring; +Cc: Andy Whitcroft, LKML, kernel-janitors
On Tue, 2017-05-09 at 23:01 +0200, SF Markus Elfring wrote:
> > Perl is odd enough already adding more non-capture groups
> > when the arguments are clearly specified is harder to read.
>
> How do you think about to reformat the affected alternations?
> Will it become appropriate to give each element a separate line there?
I have no interest in changing checkpatch for no value.
_maybe_, breaking up the file into separate tests in
multiple files _could_ be useful.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-09 21:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09 19:00 [PATCH] checkpatch: Adjust regular expressions in $logFunctions SF Markus Elfring
2017-05-09 19:00 ` SF Markus Elfring
2017-05-09 20:52 ` Joe Perches
2017-05-09 20:52 ` Joe Perches
2017-05-09 21:01 ` SF Markus Elfring
2017-05-09 21:01 ` SF Markus Elfring
2017-05-09 21:16 ` Joe Perches
2017-05-09 21:16 ` Joe Perches
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.