From: Jan Kara <jack@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Tejun Heo <tj@kernel.org>, Jan Kara <jack@suse.cz>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] lib: proportions.c: Remove some unused functions
Date: Fri, 2 Jan 2015 18:28:35 +0100 [thread overview]
Message-ID: <20150102172835.GB14135@quack.suse.cz> (raw)
In-Reply-To: <20141222132626.2697567529c7708804c4061a@linux-foundation.org>
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
next prev parent reply other threads:[~2015-01-02 17:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 14:51 Rickard Strandqvist
2014-12-22 21:26 ` Andrew Morton
2015-01-02 17:28 ` Jan Kara [this message]
2015-01-13 14:16 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150102172835.GB14135@quack.suse.cz \
--to=jack@suse.cz \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®