Re: [PATCH] lib: proportions.c: Remove some unused functions
From: Peter Zijlstra
Date: Tue Jan 13 2015 - 09:17:02 EST
On Mon, Dec 22, 2014 at 01:26:26PM -0800, Andrew Morton wrote:
> On Sat, 20 Dec 2014 15:51:53 +0100 Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx> 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?
Some of it was used once, we changed the BDI code over to the flexible
proportion code from Honza, that removed
> Perhaps we should just ifdef it out, so the code is still sitting there if
> someone wishes to resurrect it.
If there are still users of the !flex proportion code I would argue to
just leave it sit there for API completeness. It doesn't actually harm
anyone. Linkers are very good at removing dead code.
If there are in fact no users left of the !flex proportion code, then we
should just kill the entire thing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/