From: Joe Perches <joe@perches.com>
To: Constantine Shulyupin <const@MakeLinux.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH v3] checkpatch: debugfs_remove() can take NULL
Date: Sat, 17 Nov 2012 11:00:46 -0800 [thread overview]
Message-ID: <1353178846.15959.2.camel@joe-AO722> (raw)
In-Reply-To: <1353178462-3868-1-git-send-email-const@MakeLinux.com>
On Sat, 2012-11-17 at 20:54 +0200, Constantine Shulyupin wrote:
> From: Constantine Shulyupin <const@MakeLinux.com>
Hi Constantine.
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> +# check for needless debugfs_remove() and debugfs_remove_recursive*() checks
> + if ($line =~ /\b(debugfs_remove(?:_recursive)?)$expr/) {
> + WARN("NEEDLESS_DEBUGFS_REMOVE",
> + "$1(NULL) is safe this check is probably not required\n" . $hereprev);
> + }
OK,
> +# check for needless debugfs_remove_recursive() and debugfs_remove_recursive*() checks
> + if ($line =~ /\b(debugfs_remove_recursive(?:_recursive)?)$expr/) {
> + WARN("NEEDLESS_DEBUGFS_REMOVE_RECURSIVE",
> + "$1(NULL) is safe this check is probably not required\n" . $hereprev);
> + }
You don't need thus second block.
The first check finds both
debugfs_remove(foo)
and
debugfs_remove_recursive(bar)
The second one is redundant
prev parent reply other threads:[~2012-11-17 19:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 18:54 Constantine Shulyupin
2012-11-17 19:00 ` Joe Perches [this message]
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=1353178846.15959.2.camel@joe-AO722 \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=const@MakeLinux.com \
--cc=gregkh@linuxfoundation.org \
--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
all inboxes | Powered by JetHome®