mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Fabio Estevam <fabio.estevam@freescale.com>
Cc: festevam@gmail.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: Improve warning message for "needless if" case
Date: Tue, 21 Oct 2014 09:40:08 -0700	[thread overview]
Message-ID: <1413909608.12828.5.camel@perches.com> (raw)
In-Reply-To: <1413902024-2932-1-git-send-email-fabio.estevam@freescale.com>

On Tue, 2014-10-21 at 12:33 -0200, Fabio Estevam wrote:
> Break the sentence so that it looks better:
> 
> WARNING: debugfs_remove(NULL) is safe. This check is probably not required
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -4446,7 +4446,7 @@ sub process {
>  			my $expr = '\s*\(\s*' . quotemeta($1) . '\s*\)\s*;';
>  			if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?)$expr/) {
>  				WARN('NEEDLESS_IF',
> -				     "$1(NULL) is safe this check is probably not required\n" . $hereprev);
> +				     "$1(NULL) is safe. This check is probably not required\n" . $hereprev);
>  			}
>  		}
>  

Mixing sentences with and without periods is jarring.
I'd prefer a comma or a dash.


  reply	other threads:[~2014-10-21 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21 14:33 Fabio Estevam
2014-10-21 16:40 ` Joe Perches [this message]
2014-10-21 16:44   ` Fabio Estevam
2014-10-21 16:51     ` Joe Perches

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=1413909608.12828.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome