Re: [PATCH] powerpc/powernv/pci: remove dead code from !CONFIG_EEH

From
Michael Ellerman <mpe@ellerman.id.au>
Date
2021-05-18 06:13:58
Also in
lkml
Reply to
Nick Desaulniers, 2021-05-18
Nick Desaulniers [off-list ref] writes:
On Thu, Apr 22, 2021 at 6:13 PM Oliver O'Halloran [off-list ref] wrote:
quoted
On Fri, Apr 23, 2021 at 9:09 AM Daniel Axtens [off-list ref] wrote:
quoted
Hi Nick,
quoted
While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a
possible candidate to convert to #ifdef CONFIG_EEH, but it seems that
based on Kconfig dependencies it's not possible to build this file
without CONFIG_EEH enabled.
This seemed odd to me, but I think you're right:

arch/powerpc/platforms/Kconfig contains:

config EEH
        bool
        depends on (PPC_POWERNV || PPC_PSERIES) && PCI
        default y

It's not configurable from e.g. make menuconfig because there's no prompt.
You can attempt to explicitly disable it with e.g. `scripts/config -d EEH`
but then something like `make oldconfig` will silently re-enable it for
you.

It's been forced on since commit e49f7a9997c6 ("powerpc/pseries: Rivet
CONFIG_EEH for pSeries platform") in 2012 which fixed it for
pseries. That moved out from pseries to pseries + powernv later on.

There are other cleanups in the same vein that could be made, from the
Makefile (which has files only built with CONFIG_EEH) through to other
source files. It looks like there's one `#ifdef CONFIG_EEH` in
arch/powerpc/platforms/powernv/pci-ioda.c that could be pulled out, for
example.

I think it's probably worth trying to rip out all of those in one patch?
The change in commit e49f7a9997c6 ("powerpc/pseries: Rivet CONFIG_EEH
for pSeries platform") never should have been made.
I'll change my patch to keep the conditionals, but use #ifdef instead
of #if then?
Yeah, please.

I'm not sure I agree with oohal that untangling pseries/powernv from
EEH is something we should do, but let's kick that can down the road by
just fixing up the ifdef.

cheers
Thread (8 messages) 8 messages, 6 authors, last reply 2021-06-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help