From: Fabian Frederick <fabf@skynet.be>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Grant Likely <grant.likely@linaro.org>,
netdev@vger.kernel.org, Joe Perches <joe@perches.com>
Subject: Re: [PATCH 1/1] net/dsa/dsa.c: remove null test before kfree
Date: Sat, 21 Jun 2014 11:36:53 +0200 [thread overview]
Message-ID: <20140621113653.6b2dd148b35a6ecfb7c08cce@skynet.be> (raw)
In-Reply-To: <b991e868-c253-4b1a-8c95-56106c36d512@email.android.com>
On Sat, 21 Jun 2014 10:37:24 +0200
Bjørn Mork <bjorn@mork.no> wrote:
>
>
> On 20 June 2014 22:36:47 CEST, Fabian Frederick <fabf@skynet.be> wrote:
> >Fix checkpatch warning:
> >WARNING: kfree(NULL) is safe this check is probably not required
>
> "probably not" implies that there are cases where the check *is* required. That means that your commit message should explain why this particular check is redundant.
>
> I haven't analyzed your changes here, so they could be fine for all I know. My point is that such analysis is your job when submitting cleanups like this one.
>
>
>
AFAIK, any
if(foo)
kfree(foo)
can be updated to kfree(foo) but
if (foo){
kfree(foo)
do something else
}
has to be evaluated ; reason for the "probably" in warning message.
If I'm wrong maybe we could be more verbose in checkpatch :)
(I added Joe Perches in Cc list ; maybe he can help here)
Fabian
> Bjørn
next prev parent reply other threads:[~2014-06-21 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 20:36 Fabian Frederick
2014-06-21 8:37 ` Bjørn Mork
2014-06-21 9:36 ` Fabian Frederick [this message]
2014-06-21 14:10 ` Joe Perches
2014-06-22 2:22 ` David Miller
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=20140621113653.6b2dd148b35a6ecfb7c08cce@skynet.be \
--to=fabf@skynet.be \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=grant.likely@linaro.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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®