public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: do not check missing blank line before builtin_*_driver
@ 2017-09-17 14:59 Masahiro Yamada
  2017-09-17 20:44 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2017-09-17 14:59 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: Paul Gortmaker, Masahiro Yamada, linux-kernel

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(+)

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) &&
-- 
2.7.4

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

* Re: [PATCH] checkpatch: do not check missing blank line before builtin_*_driver
  2017-09-17 14:59 [PATCH] checkpatch: do not check missing blank line before builtin_*_driver Masahiro Yamada
@ 2017-09-17 20:44 ` Joe Perches
  2017-09-18  2:02   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2017-09-17 20:44 UTC (permalink / raw)
  To: Masahiro Yamada, Andy Whitcroft; +Cc: Paul Gortmaker, linux-kernel

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

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

* Re: [PATCH] checkpatch: do not check missing blank line before builtin_*_driver
  2017-09-17 20:44 ` Joe Perches
@ 2017-09-18  2:02   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2017-09-18  2:02 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, Paul Gortmaker, Linux Kernel Mailing List

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

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

end of thread, other threads:[~2017-09-18  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-17 14:59 [PATCH] checkpatch: do not check missing blank line before builtin_*_driver Masahiro Yamada
2017-09-17 20:44 ` Joe Perches
2017-09-18  2:02   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox