public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Shradha Todi" <shradha.t@samsung.com>
To: "'Joe Perches'" <joe@perches.com>, <linux-kernel@vger.kernel.org>
Cc: <apw@canonical.com>, <pankaj.dubey@samsung.com>,
	"'Lakshay Mehra'" <l.mehra@samsung.com>
Subject: RE: [PATCH] checkpatch: add warning for line space after "Fixes:" tag
Date: Mon, 1 Feb 2021 16:54:14 +0530	[thread overview]
Message-ID: <19f201d6f88c$cba69450$62f3bcf0$@samsung.com> (raw)
In-Reply-To: <a04109c80ded369fcbf8829d3d9461be7528226d.camel@perches.com>

> -----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




  parent reply	other threads:[~2021-02-01 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2021-02-01 16:31       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='19f201d6f88c$cba69450$62f3bcf0$@samsung.com' \
    --to=shradha.t@samsung.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=l.mehra@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.dubey@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox