Skip to contentSkip to conversation

pseries/vio: Remove stray #ifdef CONFIG_PPC_PSERIES

PATCH In review Oliver O'Halloran 4 participants 7 messages Jan 30, 2020 – Mar 6, 2020 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pseries/vio: Remove stray #ifdef CONFIG_PPC_PSERIES

vio.c requires CONFIG_IBMVIO which in turn depends on PPC_PSERIES. In other words, this ifdef is pointless. At a guess it's a carry-over from pre-history.

---
 arch/powerpc/platforms/pseries/vio.c | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/platforms/pseries/vio.c +0 -2
index f682b7b..37f1f25 100644
@@ -1628,7 +1628,6 @@ const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
 }
 EXPORT_SYMBOL(vio_get_attribute);
 
-#ifdef CONFIG_PPC_PSERIES
 /* vio_find_name() - internal because only vio.c knows how we formatted the
  * kobject name
  */
@@ -1698,7 +1697,6 @@ int vio_disable_interrupts(struct vio_dev *dev)
 	return rc;
 }
 EXPORT_SYMBOL(vio_disable_interrupts);
-#endif /* CONFIG_PPC_PSERIES */
 
 static int __init vio_init(void)
 {
Signature · 1 line
2.9.5
#1 lore raw

PATCH 2/2 pseries/makefile: Remove CONFIG_PPC_PSERIES check

The platform makefile (arch/powerpc/platforms/pseries/Makefile) is only included by the platform makefile (arch/powerpc/platform/Makefile) when CONFIG_PPC_PSERIES is selected, so checking for CONFIG_PPC_PSERIES in the pseries makefile is pointless.

---
 arch/powerpc/platforms/pseries/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/platforms/pseries/Makefile +0 -2
index a3c74a5..c8a2b0b 100644
@@ -29,6 +29,4 @@ obj-$(CONFIG_PPC_SPLPAR)	+= vphn.o
 obj-$(CONFIG_PPC_SVM)		+= svm.o
 obj-$(CONFIG_FA_DUMP)		+= rtas-fadump.o
 
-ifdef CONFIG_PPC_PSERIES
 obj-$(CONFIG_SUSPEND)		+= suspend.o
-endif
Signature · 1 line
2.9.5
#2 lore raw

Re: [PATCH 2/2] pseries/makefile: Remove CONFIG_PPC_PSERIES check

Quoted 2 lines · Oliver O'Halloran

The platform makefile (arch/powerpc/platforms/pseries/Makefile) is only

doh

s/platform/pseries/

Quoted 23 lines

included by the platform makefile (arch/powerpc/platform/Makefile) when CONFIG_PPC_PSERIES is selected, so checking for CONFIG_PPC_PSERIES in the pseries makefile is pointless.

---
 arch/powerpc/platforms/pseries/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/powerpc/platforms/pseries/Makefile +0 -3
index a3c74a5..c8a2b0b 100644
@@ -29,6 +29,4 @@ obj-$(CONFIG_PPC_SPLPAR)      += vphn.o
 obj-$(CONFIG_PPC_SVM)          += svm.o
 obj-$(CONFIG_FA_DUMP)          += rtas-fadump.o
 
-ifdef CONFIG_PPC_PSERIES
 obj-$(CONFIG_SUSPEND)          += suspend.o
-endif
--

2.9.5

Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] pseries/makefile: Remove CONFIG_PPC_PSERIES check

In reply to Oliver O'Halloran
Quoted 6 lines · Oliver O'Halloran

The platform makefile (arch/powerpc/platforms/pseries/Makefile) is only included by the platform makefile (arch/powerpc/platform/Makefile) when CONFIG_PPC_PSERIES is selected, so checking for CONFIG_PPC_PSERIES in the pseries makefile is pointless.

#5 lore raw
In reply to Oliver O'Halloran

Subject: Re: [PATCH 1/2] pseries/vio: Remove stray #ifdef CONFIG_PPC_PSERIES

                         ^
                         powerpc/

Please.

I'll fix it up.

Quoted 2 lines · Oliver O'Halloran

vio.c requires CONFIG_IBMVIO which in turn depends on PPC_PSERIES. In other words, this ifdef is pointless.

And all of platforms/pseries is only built if PPC_PSERIES=y.

Quoted 1 line

At a guess it's a carry-over from pre-history.

It's not pre-history. Probably should have been cleaned up in:

commit b0787660260604ba63621881851de0032279819b

Author:     Stephen Rothwell <[email protected]>
AuthorDate: Wed Mar 7 18:43:10 2012 +0000
Commit:     Benjamin Herrenschmidt <[email protected]>
CommitDate: Fri Mar 9 10:35:23 2012 +1100

powerpc: clean up vio.c

This cleans up vio.c after the removal of the legacy iSeries platform. It also removes some no longer referenced include files.

cheers

Quoted 22 lines
arch/powerpc/platforms/pseries/vio.c +0 -2
index f682b7b..37f1f25 100644
@@ -1628,7 +1628,6 @@ const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
 }
 EXPORT_SYMBOL(vio_get_attribute);
 
-#ifdef CONFIG_PPC_PSERIES
 /* vio_find_name() - internal because only vio.c knows how we formatted the
  * kobject name
  */
@@ -1698,7 +1697,6 @@ int vio_disable_interrupts(struct vio_dev *dev)
 	return rc;
 }
 EXPORT_SYMBOL(vio_disable_interrupts);
-#endif /* CONFIG_PPC_PSERIES */
 
 static int __init vio_init(void)
 {
Signature · 1 line
2.9.5