* powerpc: Dead code in commit bdc728a849a7
@ 2015-04-13 18:27 ` Andreas Ruprecht
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Ruprecht @ 2015-04-13 18:27 UTC (permalink / raw)
To: Daniel Axtens
Cc: Michael Ellerman, Valentin Rothberg, Stefan Hengelein,
Paul Bolle, linux-kernel, linuxppc-dev
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* powerpc: Dead code in commit bdc728a849a7
@ 2015-04-13 18:27 ` Andreas Ruprecht
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Ruprecht @ 2015-04-13 18:27 UTC (permalink / raw)
To: Daniel Axtens
Cc: Paul Bolle, linux-kernel, linuxppc-dev, Stefan Hengelein,
Valentin Rothberg
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
2015-04-13 18:27 ` Andreas Ruprecht
@ 2015-04-14 0:16 ` Daniel Axtens
-1 siblings, 0 replies; 4+ messages in thread
From: Daniel Axtens @ 2015-04-14 0:16 UTC (permalink / raw)
To: Andreas Ruprecht
Cc: Michael Ellerman, Valentin Rothberg, Stefan Hengelein,
Paul Bolle, linux-kernel, linuxppc-dev, Daniel Axtens
In bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries
specific code"), find_and_init_phbs() was moved into a pseries
specific file, but PPC32 code wasn't removed. Remove it.
See https://lkml.kernel.org/r/552C0AA6.4010403@fau.de
Reported-by: Andreas Ruprecht <andreas.ruprecht@fau.de>
Fixes: bdc728a849a7
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/platforms/pseries/setup.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 328e318..baefd3e 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -499,13 +499,6 @@ static void __init find_and_init_phbs(void)
else
pci_clear_flags(PCI_PROBE_ONLY);
}
-
-#ifdef CONFIG_PPC32 /* Will be made generic soon */
- prop = of_get_property(of_chosen,
- "linux,pci-assign-all-buses", NULL);
- if (prop && *prop)
- pci_add_flags(PCI_REASSIGN_ALL_BUS);
-#endif /* CONFIG_PPC32 */
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
@ 2015-04-14 0:16 ` Daniel Axtens
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Axtens @ 2015-04-14 0:16 UTC (permalink / raw)
To: Andreas Ruprecht
Cc: Paul Bolle, linux-kernel, Daniel Axtens, linuxppc-dev,
Stefan Hengelein, Valentin Rothberg
In bdc728a849a7 ("powerpc: move find_and_init_phbs() to pSeries
specific code"), find_and_init_phbs() was moved into a pseries
specific file, but PPC32 code wasn't removed. Remove it.
See https://lkml.kernel.org/r/552C0AA6.4010403@fau.de
Reported-by: Andreas Ruprecht <andreas.ruprecht@fau.de>
Fixes: bdc728a849a7
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
arch/powerpc/platforms/pseries/setup.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 328e318..baefd3e 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -499,13 +499,6 @@ static void __init find_and_init_phbs(void)
else
pci_clear_flags(PCI_PROBE_ONLY);
}
-
-#ifdef CONFIG_PPC32 /* Will be made generic soon */
- prop = of_get_property(of_chosen,
- "linux,pci-assign-all-buses", NULL);
- if (prop && *prop)
- pci_add_flags(PCI_REASSIGN_ALL_BUS);
-#endif /* CONFIG_PPC32 */
}
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-14 0:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 18:27 powerpc: Dead code in commit bdc728a849a7 Andreas Ruprecht
2015-04-13 18:27 ` 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
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.