diff mbox series

checkpatch: do not check missing blank line before builtin_*_driver

Message ID 1505660376-10646-1-git-send-email-yamada.masahiro@socionext.com
State Superseded
Headers show
Series checkpatch: do not check missing blank line before builtin_*_driver | expand

Commit Message

Masahiro Yamada Sept. 17, 2017, 2:59 p.m. UTC
checkpatch.pl does not check missing blank line before module_*_driver.
I want it to behave likewise for builtin_*_driver.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

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

-- 
2.7.4

Comments

Joe Perches Sept. 17, 2017, 8:44 p.m. UTC | #1
On Sun, 2017-09-17 at 23:59 +0900, Masahiro Yamada wrote:
> checkpatch.pl does not check missing blank line before module_*_driver.

> I want it to behave likewise for builtin_*_driver.

[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl

> index dd2c262aebbf..cec896306619 100755

> --- a/scripts/checkpatch.pl

> +++ b/scripts/checkpatch.pl

> @@ -3103,6 +3103,7 @@ sub process {

>  		      $line =~ /^\+[a-z_]*init/ ||

>  		      $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||

>  		      $line =~ /^\+\s*DECLARE/ ||

> +		      $line =~ /^\+\s*builtin_/ ||


I believe

		      $line =~ /^\+\s*builtin_[\w_]*driver/ ||

would be better
Masahiro Yamada Sept. 18, 2017, 2:02 a.m. UTC | #2
Hi Joe,

2017-09-18 5:44 GMT+09:00 Joe Perches <joe@perches.com>:
> On Sun, 2017-09-17 at 23:59 +0900, Masahiro Yamada wrote:

>> checkpatch.pl does not check missing blank line before module_*_driver.

>> I want it to behave likewise for builtin_*_driver.

> []

>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl

>> index dd2c262aebbf..cec896306619 100755

>> --- a/scripts/checkpatch.pl

>> +++ b/scripts/checkpatch.pl

>> @@ -3103,6 +3103,7 @@ sub process {

>>                     $line =~ /^\+[a-z_]*init/ ||

>>                     $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||

>>                     $line =~ /^\+\s*DECLARE/ ||

>> +                   $line =~ /^\+\s*builtin_/ ||

>

> I believe

>

>                       $line =~ /^\+\s*builtin_[\w_]*driver/ ||

>

> would be better



Thanks for your advice.
I've sent v2.


-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dd2c262aebbf..cec896306619 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3103,6 +3103,7 @@  sub process {
 		      $line =~ /^\+[a-z_]*init/ ||
 		      $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
 		      $line =~ /^\+\s*DECLARE/ ||
+		      $line =~ /^\+\s*builtin_/ ||
 		      $line =~ /^\+\s*__setup/)) {
 			if (CHK("LINE_SPACING",
 				"Please use a blank line after function/struct/union/enum declarations\n" . $hereprev) &&