lkml.org 
[lkml]   [2015]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lib: proportions.c: Remove some unused functions
On Mon 22-12-14 13:26:26, Andrew Morton wrote:
> On Sat, 20 Dec 2014 15:51:53 +0100 Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> wrote:
>
> > Removes some functions that are not used anywhere:
> > prop_change_shift() prop_descriptor_init() prop_fraction_percpu() prop_fraction_single() __prop_inc_percpu_max() prop_local_destroy_percpu() prop_local_destroy_single() prop_local_init_percpu() prop_local_init_single()
> >
> > This was partially found by using a static code analysis program called cppcheck.
> >
> > ---
> > include/linux/proportions.h | 14 ----
> > lib/proportions.c | 177 -------------------------------------------
> > 2 files changed, 191 deletions(-)
>
> Gee, that's a heck of a lot of dead code.
>
> Peter, what was the thinking here? Was this code once used, or added
> for API completeness or what?
>
> Perhaps we should just ifdef it out, so the code is still sitting there if
> someone wishes to resurrect it.
I believe the reason was API completeness. Ifdefing the code out looks
like a sensible thing to do - although I would be happier if we at least
compile-tested the code... Isn't there some config option we could key off
to detect something like all-yes config build?

Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2015-01-02 18:41    [W:0.164 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site