linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
To: Aditya <yashsri421@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix option for COMMIT_LOG_LONG_LINE
Date: Mon, 2 Nov 2020 08:33:07 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2011020831130.11801@felia> (raw)
In-Reply-To: <dbe7fc9c-8b68-aa2a-f35b-1a387b373186@gmail.com>



On Sun, 1 Nov 2020, Aditya wrote:

> On 31/10/20 6:55 pm, Aditya Srivastava wrote:
> > Currently, if a line exceeds 75 characters in a commit message,
> > checkpatch.pl gives a warning corresponding to the same.
> > 
> > E.g., running checkpatch on commit a1af2afbd244 ("drm/nouveau/volt:Fix
> > for some cards having 0 maximum voltage") reports this warning:
> > 
> > WARNING: Possible unwrapped commit description (prefer a maximum 75
> > chars per line)
> > 
> > Some, mostly Fermi, vbioses appear to have zero max voltage. That causes Nouveau to not parse voltage entries, thus users not being able to set higher clocks.
> > 
> > Fix this warning by truncating the line after 75 chars, and push the
> > remaining content to the next line
> > 
> > Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
> > ---
> >  scripts/checkpatch.pl | 16 ++++++++++++++--
> >  1 file changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 5329927fc1c1..a0107ed257d1 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -2881,8 +2881,20 @@ sub process {
> >  		      $line =~ /^\s*(?:Fixes:|Link:)/i ||
> >  					# A Fixes: or Link: line
> >  		      $commit_log_possible_stack_dump)) {
> > -			WARN("COMMIT_LOG_LONG_LINE",
> > -			     "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
> > +			if (WARN("COMMIT_LOG_LONG_LINE",
> > +			     	 "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr) &&
> > +			    $fix) {
> > +				fix_delete_line($fixlinenr, $rawline);
> > +				my $curr_line = $rawline;
> > +				my $fixedline;
> > +				while (length($curr_line) > 0) {
> > +					# trim current line for any unnecessary spaces
> > +					$curr_line = trim($curr_line);
> > +					$fixedline = substr($curr_line, 0, 75);
> > +					fix_insert_line($fixlinenr+1, $fixedline);
> > +					$curr_line =~ s/$fixedline//;
> > +				}
> > +			}
> >  			$commit_log_long_line = 1;
> >  		}
> >  
> > 
> 
> Hi Sir
> Seeking your feedback on this one
>

Please respect that I do have a full-time job and a weekend where I am 
supposed to work less than from Mon to Fri.

I will get back to you after two or three working days; if not, then you 
can ping me. Any ping early will just make me annoyed.

Lukas
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply	other threads:[~2020-11-02  7:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 13:25 [Linux-kernel-mentees] [PATCH] checkpatch: add fix option for COMMIT_LOG_LONG_LINE Aditya Srivastava
2020-11-01 11:04 ` Aditya
2020-11-02  7:33   ` Lukas Bulwahn [this message]
2020-11-02  7:25 ` Lukas Bulwahn
2020-11-02 13:31   ` Aditya
2020-11-03  8:38     ` Aditya
2020-11-03 10:41       ` Lukas Bulwahn
2020-11-03 10:45       ` Lukas Bulwahn

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=alpine.DEB.2.21.2011020831130.11801@felia \
    --to=lukas.bulwahn@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=yashsri421@gmail.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;
as well as URLs for NNTP newsgroup(s).