All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ruprecht <andreas.ruprecht@fau.de>
To: Daniel Axtens <dja@axtens.net>
Cc: Paul Bolle <pebolle@tiscali.nl>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org,
	Stefan Hengelein <stefan.hengelein@fau.de>,
	Valentin Rothberg <valentinrothberg@gmail.com>
Subject: powerpc: Dead code in commit bdc728a849a7
Date: Mon, 13 Apr 2015 20:27:50 +0200	[thread overview]
Message-ID: <552C0AA6.4010403@fau.de> (raw)

Hi Daniel,

your commit bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries
specific code") in today's Linux next tree moves a function into the
pSeries specific setup.c file. I noticed it because I'm running an
automated bot on top of linux-next which looks for variability-related
defects with undertaker-checkpatch[0].

Inside the function, there is an #ifdef block which depends on
CONFIG_PPC32 to be set. However, the file at
arch/powerpc/platforms/pseries/setup.c will only be built if
CONFIG_PPC_PSERIES is enabled[1], which through its Kconfig dependencies
can only be selected if CONFIG_PPC64 is enabled[2]. As CONFIG_PPC32 and
CONFIG_PPC64 are mutually exclusive, the #ifdef can never evaluate to
true, and the corresponding code is dead.

Should I send a patch which removes the #ifdef and the dead code or
would you prefer to do this yourself?

Best regards,

Andreas

[0] https://undertaker.cs.fau.de
[1] arch/powerpc/platforms/Makefile, line 18
[2] arch/powerpc/platforms/pseries/Kconfig, line 2

WARNING: multiple messages have this Message-ID (diff)
From: Andreas Ruprecht <andreas.ruprecht@fau.de>
To: Daniel Axtens <dja@axtens.net>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Valentin Rothberg <valentinrothberg@gmail.com>,
	Stefan Hengelein <stefan.hengelein@fau.de>,
	Paul Bolle <pebolle@tiscali.nl>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: powerpc: Dead code in commit bdc728a849a7
Date: Mon, 13 Apr 2015 20:27:50 +0200	[thread overview]
Message-ID: <552C0AA6.4010403@fau.de> (raw)

Hi Daniel,

your commit bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries
specific code") in today's Linux next tree moves a function into the
pSeries specific setup.c file. I noticed it because I'm running an
automated bot on top of linux-next which looks for variability-related
defects with undertaker-checkpatch[0].

Inside the function, there is an #ifdef block which depends on
CONFIG_PPC32 to be set. However, the file at
arch/powerpc/platforms/pseries/setup.c will only be built if
CONFIG_PPC_PSERIES is enabled[1], which through its Kconfig dependencies
can only be selected if CONFIG_PPC64 is enabled[2]. As CONFIG_PPC32 and
CONFIG_PPC64 are mutually exclusive, the #ifdef can never evaluate to
true, and the corresponding code is dead.

Should I send a patch which removes the #ifdef and the dead code or
would you prefer to do this yourself?

Best regards,

Andreas

[0] https://undertaker.cs.fau.de
[1] arch/powerpc/platforms/Makefile, line 18
[2] arch/powerpc/platforms/pseries/Kconfig, line 2

             reply	other threads:[~2015-04-13 18:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 18:27 Andreas Ruprecht [this message]
2015-04-13 18:27 ` powerpc: Dead code in commit bdc728a849a7 Andreas Ruprecht
2015-04-14  0:16 ` [PATCH] powerpc: Remove PPC32 code from pseries specific find_and_init_phbs() Daniel Axtens
2015-04-14  0:16   ` Daniel Axtens

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=552C0AA6.4010403@fau.de \
    --to=andreas.ruprecht@fau.de \
    --cc=dja@axtens.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=pebolle@tiscali.nl \
    --cc=stefan.hengelein@fau.de \
    --cc=valentinrothberg@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.