* [PATCH] kfree calls cleanup
@ 2004-05-24 14:17 Benoît Dejean
2004-06-02 18:06 ` Timothy Miller
0 siblings, 1 reply; 2+ messages in thread
From: Benoît Dejean @ 2004-05-24 14:17 UTC (permalink / raw)
To: LKML
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
i've removed some useless test for NULL pointer before kfree calls.
if(p) kfree(p) -> kfree(p)
i've also removed variables that have become unused.
the patch is quite big, but i've check it many times.
--
Benoît Dejean
JID: TazForEver@jabber.org
http://gdesklets.gnomedesktop.org
http://www.paulla.asso.fr
[-- Attachment #2: kfree.patch.6.bz2 --]
[-- Type: application/x-bzip, Size: 26628 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kfree calls cleanup
2004-05-24 14:17 [PATCH] kfree calls cleanup Benoît Dejean
@ 2004-06-02 18:06 ` Timothy Miller
0 siblings, 0 replies; 2+ messages in thread
From: Timothy Miller @ 2004-06-02 18:06 UTC (permalink / raw)
To: 翽 Dejean; +Cc: LKML
Benoît Dejean wrote:
> i've removed some useless test for NULL pointer before kfree calls.
> if(p) kfree(p) -> kfree(p)
> i've also removed variables that have become unused.
> the patch is quite big, but i've check it many times.
This is valid since kfree checks for null pointer, but while the extra
"if (p)" is redundant, if p is most often NULL somewhere, then you can
avoid the function call overhead by this very low-cost check. (Unless
kfree is a macro which includes the check in the macro.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-02 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-24 14:17 [PATCH] kfree calls cleanup Benoît Dejean
2004-06-02 18:06 ` Timothy Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox