[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140621113653.6b2dd148b35a6ecfb7c08cce@skynet.be>
Date: Sat, 21 Jun 2014 11:36:53 +0200
From: Fabian Frederick <fabf@...net.be>
To: Bjørn Mork <bjorn@...k.no>
Cc: linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Grant Likely <grant.likely@...aro.org>, netdev@...r.kernel.org,
Joe Perches <joe@...ches.com>
Subject: Re: [PATCH 1/1] net/dsa/dsa.c: remove null test before kfree
On Sat, 21 Jun 2014 10:37:24 +0200
Bjørn Mork <bjorn@...k.no> wrote:
>
>
> On 20 June 2014 22:36:47 CEST, Fabian Frederick <fabf@...net.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists