lkml.org 
[lkml]   [2009]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Remove some pointless conditionals before kfree() in kernel/cgroup.c
Jesper Juhl wrote:
> Hi,
>
> Here's a small patch for kernel/cgroup.c
>
> Removes a few pointless tests of pointer == 0 before kfree() in
> kernel/cgroup.c.
> If the pointer we hand to kfree() is 0, then kfree() is a noop, so there
> is no need to test.
>
> Reduces object file size a bit :
>
> Before:
> $ size kernel/cgroup.o
> text data bss dec hex filename
> 21593 7804 4924 34321 8611 kernel/cgroup.o
> After:
> $ size kernel/cgroup.o
> text data bss dec hex filename
> 21537 7744 4924 34205 859d kernel/cgroup.o
>
> and source file size shrinks a bit too - always nice.
>
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>




\
 
 \ /
  Last update: 2009-02-23 09:35    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog