* [PATCH] checkpatch: add warning for line space after "Fixes:" tag [not found] <CGME20210128152646epcas5p3e0ceb57e0a2e668b4281b5733dd117d4@epcas5p3.samsung.com> @ 2021-01-28 15:26 ` Shradha Todi [not found] ` <a04109c80ded369fcbf8829d3d9461be7528226d.camel@perches.com> 0 siblings, 1 reply; 3+ messages in thread From: Shradha Todi @ 2021-01-28 15:26 UTC (permalink / raw) To: linux-kernel; +Cc: apw, joe, pankaj.dubey, Shradha Todi, Lakshay Mehra Add a check to give warning for line break between Fixes tag and signature tags as that is the commonly followed style. Also add a --fix option to delete space lines after "Fixes:" tag. Signed-off-by: Lakshay Mehra <l.mehra@samsung.com> Signed-off-by: Shradha Todi <shradha.t@samsung.com> --- scripts/checkpatch.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 92e888e..6c144c5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3027,6 +3027,15 @@ sub process { $commit_log_long_line = 1; } +# Check for no line break after Fixes + if ($line =~ /^\s*Fixes:/i && $rawlines[$linenr] =~ /^\s*$/) { + if (WARN("UNNECESSARY_NEWLINE", + "Newline is not required after Fixes:\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr+1, $rawline); + } + } + # Reset possible stack dump if a blank line is found if ($in_commit_log && $commit_log_possible_stack_dump && $line =~ /^\s*$/) { -- 2.7.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <a04109c80ded369fcbf8829d3d9461be7528226d.camel@perches.com>]
* RE: [PATCH] checkpatch: add warning for line space after "Fixes:" tag [not found] ` <a04109c80ded369fcbf8829d3d9461be7528226d.camel@perches.com> @ 2021-02-01 11:24 ` Shradha Todi 2021-02-01 16:31 ` Krzysztof Kozlowski 0 siblings, 1 reply; 3+ messages in thread From: Shradha Todi @ 2021-02-01 11:24 UTC (permalink / raw) To: 'Joe Perches', linux-kernel Cc: apw, pankaj.dubey, 'Lakshay Mehra' > -----Original Message----- > From: Joe Perches <joe@perches.com> > Subject: Re: [PATCH] checkpatch: add warning for line space after "Fixes:" tag > > On Thu, 2021-01-28 at 20:56 +0530, Shradha Todi wrote: > > Add a check to give warning for line break between Fixes tag > > and signature tags as that is the commonly followed style. > > > > Also add a --fix option to delete space lines after "Fixes:" tag. > > > > Signed-off-by: Lakshay Mehra <l.mehra@samsung.com> > > Signed-off-by: Shradha Todi <shradha.t@samsung.com> > > --- > > scripts/checkpatch.pl | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index 92e888e..6c144c5 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -3027,6 +3027,15 @@ sub process { > > $commit_log_long_line = 1; > > } > > > > > > +# Check for no line break after Fixes > > + if ($line =~ /^\s*Fixes:/i && $rawlines[$linenr] =~ /^\s*$/) { > > + if (WARN("UNNECESSARY_NEWLINE", > > + "Newline is not required after Fixes:\n" . > $herecurr) && > > + $fix) { > > + fix_delete_line($fixlinenr+1, $rawline); > > + } > > + } > > I think this isn't necessary and $rawlines[$linenr] may be not exist. > I recently submitted a patch with the fixes tag followed by a line break and then SOB. I received a comment saying "no line space between Fixes and SOB" [1]. So my intention of adding this was to save the maintainers time from these silly mistakes. Any suggestions for improving this patch? Thanks a ton for the prompt review. [1]: https://lkml.org/lkml/2021/1/6/291 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: add warning for line space after "Fixes:" tag 2021-02-01 11:24 ` Shradha Todi @ 2021-02-01 16:31 ` Krzysztof Kozlowski 0 siblings, 0 replies; 3+ messages in thread From: Krzysztof Kozlowski @ 2021-02-01 16:31 UTC (permalink / raw) To: Shradha Todi Cc: Joe Perches, linux-kernel@vger.kernel.org, apw, pankaj.dubey, Lakshay Mehra On Mon, 1 Feb 2021 at 12:27, Shradha Todi <shradha.t@samsung.com> wrote: > > > -----Original Message----- > > From: Joe Perches <joe@perches.com> > > Subject: Re: [PATCH] checkpatch: add warning for line space after > "Fixes:" tag > > > > On Thu, 2021-01-28 at 20:56 +0530, Shradha Todi wrote: > > > Add a check to give warning for line break between Fixes tag > > > and signature tags as that is the commonly followed style. > > > > > > Also add a --fix option to delete space lines after "Fixes:" tag. > > > > > > Signed-off-by: Lakshay Mehra <l.mehra@samsung.com> > > > Signed-off-by: Shradha Todi <shradha.t@samsung.com> > > > --- > > > scripts/checkpatch.pl | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > > index 92e888e..6c144c5 100755 > > > --- a/scripts/checkpatch.pl > > > +++ b/scripts/checkpatch.pl > > > @@ -3027,6 +3027,15 @@ sub process { > > > $commit_log_long_line = 1; > > > } > > > > > > > > > +# Check for no line break after Fixes > > > + if ($line =~ /^\s*Fixes:/i && $rawlines[$linenr] =~ > /^\s*$/) { > > > + if (WARN("UNNECESSARY_NEWLINE", > > > + "Newline is not required after Fixes:\n" . > > $herecurr) && > > > + $fix) { > > > + fix_delete_line($fixlinenr+1, $rawline); > > > + } > > > + } > > > > I think this isn't necessary and $rawlines[$linenr] may be not exist. > > > > I recently submitted a patch with the fixes tag followed by a line break > and then SOB. > I received a comment saying "no line space between Fixes and SOB" [1]. > So my intention of adding this was to save the maintainers time from these > silly mistakes. > Any suggestions for improving this patch? Thanks a ton for the prompt > review. Hi, Thanks for your submission. Suggestion is: do not ping too early, give around 2 weeks for review. If nothing happens after two weeks, resend or ping. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-01 16:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20210128152646epcas5p3e0ceb57e0a2e668b4281b5733dd117d4@epcas5p3.samsung.com>
2021-01-28 15:26 ` [PATCH] checkpatch: add warning for line space after "Fixes:" tag Shradha Todi
[not found] ` <a04109c80ded369fcbf8829d3d9461be7528226d.camel@perches.com>
2021-02-01 11:24 ` Shradha Todi
2021-02-01 16:31 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox