linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Arseny Solokha <asolokha@kb.kras.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Scott Wood <scottwood@freescale.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] powerpc/mpic: remove unused functions
Date: Fri, 20 Feb 2015 14:34:32 +1100	[thread overview]
Message-ID: <1424403272.26444.1.camel@ellerman.id.au> (raw)
In-Reply-To: <87d256kry8.fsf@KB00016249.iskra.kb>

On Thu, 2015-02-19 at 19:26 +0700, Arseny Solokha wrote:
> > On Mon, 2015-02-16 at 17:56 +0700, Arseny Solokha wrote:
> >> Drop unused fsl_mpic_primary_get_version(), mpic_set_clk_ratio(),
> >> mpic_set_serial_int().
> >
> > I'm always happy to remove unused code, but the interesting question is why are
> > they unused? Please tell me in the changelog.
> 
> To being able to give a definitive answer, it's necessary to understand
> the intentions of original developers of these pieces. I just can tell
> these functions have no users and trivial grepping easily proves it;
> I've got the impression they are here only for the sake of
> implementation completeness.

Yeah OK. I didn't expect you to read the minds of the developers who wrote the
code :)
 
> Two machines at hands, e300 and e500 based, boot and run without
> regressions on my workload with this series applied. The removed code
> seems also been rarely touched, so it seems the series is safe at least
> in general. But I can't obviously express any strong point in support of
> the series, so it's completely OK to leave things as is.

OK that's a good data point.

>   + fsl_mpic_primary_get_version() is just a safe wrapper around
> fsl_mpic_get_version() for SMP configurations. While the latter is
> called explicitly for handling PIC initialization and setting up error
> interrupt vector depending on PIC hardware version, the former isn't
> used for anything.
> 
>   + As for mpic_set_clk_ratio() and mpic_set_serial_int(), they both
> are almost nine years old[1] but still have no chance to be called even
> from out-of-tree modules because they both are __init and of course
> aren't exported. Non-demanded functionality?
> 
> Of course I'll include the last two paragraphs into the V2 patch
> description if the explanation is convincing enough and you ACK it. If
> the patch is safe it's also necessary to extend it a bit, making its
> second part actually a complete revert of [1].
> 
> [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html

That is more like what I was looking for.

If I just get a patch saying "removed unused foo()", I have to go and dig and
find out:
  - was it recently added and will be used soon?
  - is it ancient and never used, if so can we work out why, ie. feature X
    never landed so this code is no longer needed.
  - is it old code that *was* used but isn't now because commit ... removed the
    last user.
  - is it code that *should* be used, but isn't for some odd reason?


So if you can provide that sort of detail for me, that really adds value to the
patch. Otherwise the patch is basically just a TODO for me, to go and work out
why the code is unused.

cheers



  reply	other threads:[~2015-02-20  3:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 10:56 [PATCH 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-02-16 10:56 ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-02-16 10:56 ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-02-16 10:56 ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-02-16 10:56 ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-02-19  0:58   ` Michael Ellerman
2015-02-19 12:26     ` Arseny Solokha
2015-02-20  3:34       ` Michael Ellerman [this message]
2015-02-20  4:40         ` Arseny Solokha
2015-02-24  4:48           ` Michael Ellerman
2015-02-23 21:31       ` Scott Wood
2015-02-26  2:39         ` Hongtao Jia
2015-02-26  3:27           ` Scott Wood
2015-02-24  9:05 ` [PATCH V2 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-02-24  9:05   ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-02-24  9:05   ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-02-24  9:05   ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-02-24  9:05   ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-02-27  2:25     ` Arseny Solokha
2015-03-20  3:56   ` [PATCH v3 0/4] powerpc: trivial unused functions cleanup Arseny Solokha
2015-03-20  3:56     ` [PATCH 1/4] powerpc/boot: drop planetcore_set_serial_speed Arseny Solokha
2015-03-20  3:56     ` [PATCH 2/4] kvm/ppc/mpic: drop unused IRQ_testbit Arseny Solokha
2015-03-20 11:41       ` Alexander Graf
2015-03-21  6:56         ` [PATCH v4 " Arseny Solokha
2015-03-21 14:54           ` Alexander Graf
2015-03-20  3:56     ` [PATCH 3/4] powrepc/qe: drop unused ucc_slow_poll_transmitter_now Arseny Solokha
2015-03-20  3:56     ` [PATCH 4/4] powerpc/mpic: remove unused functions Arseny Solokha
2015-03-20  4:23     ` [PATCH v3 0/4] powerpc: trivial unused functions cleanup Michael Ellerman
2015-03-20  4:55       ` Arseny Solokha
2015-03-20  5:39         ` Michael Ellerman
2015-03-21  6:56           ` Arseny Solokha

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=1424403272.26444.1.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=asolokha@kb.kras.ru \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=scottwood@freescale.com \
    /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;
as well as URLs for NNTP newsgroup(s).