Skip to contentSkip to conversation

Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

PATCH In review Herve Codina 3 participants 6 messages May 23, 2023 – May 25, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

This series fixes issues raised by the kernel test robot
https://lore.kernel.org/oe-kbuild-all/[email protected]/

In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM2.

Compare to the previous iteration
https://lore.kernel.org/linux-kernel/[email protected]/
this v2 series fully removes COMPILE_TEST from the CPM uart dependencies.

Best regards,
Hervé

Changes v1 -> v2
- Patch 2
Remove COMPILE_TEST dependency

Herve Codina (2):
soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST
serial: cpm_uart: Fix a COMPILE_TEST dependency

 drivers/soc/fsl/qe/Kconfig             | 4 ++--
 drivers/tty/serial/Kconfig             | 2 +-
 drivers/tty/serial/cpm_uart/cpm_uart.h | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH v2 1/2 soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST

In order to compile tsa.c and qmc.c, CONFIG_CPM must be set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM.

---
 drivers/soc/fsl/qe/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/fsl/qe/Kconfig +2 -2
index 7268c2fbcbc1..e0d096607fef 100644
@@ -36,7 +36,7 @@ config UCC
 config CPM_TSA
 	tristate "CPM TSA support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || COMPILE_TEST
+	depends on CPM1 || (CPM && COMPILE_TEST)
 	help
 	  Freescale CPM Time Slot Assigner (TSA)
 	  controller.
@@ -47,7 +47,7 @@ config CPM_TSA
 config CPM_QMC
 	tristate "CPM QMC support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || (FSL_SOC && COMPILE_TEST)
+	depends on CPM1 || (FSL_SOC && CPM && COMPILE_TEST)
 	depends on CPM_TSA
 	help
 	  Freescale CPM QUICC Multichannel Controller
Signature · 1 line
2.40.1
Acked-by Tested-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST

Quoted 9 lines · Herve Codina

In order to compile tsa.c and qmc.c, CONFIG_CPM must be set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM.

Fixes all of my CPM build issues. (with patch 2/2 also applied) Thanks.

Quoted 26 lines
---
 drivers/soc/fsl/qe/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/fsl/qe/Kconfig +2 -2
index 7268c2fbcbc1..e0d096607fef 100644
@@ -36,7 +36,7 @@ config UCC
 config CPM_TSA
 	tristate "CPM TSA support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || COMPILE_TEST
+	depends on CPM1 || (CPM && COMPILE_TEST)
 	help
 	  Freescale CPM Time Slot Assigner (TSA)
 	  controller.
@@ -47,7 +47,7 @@ config CPM_TSA
 config CPM_QMC
 	tristate "CPM QMC support"
 	depends on OF && HAS_IOMEM
-	depends on CPM1 || (FSL_SOC && COMPILE_TEST)
+	depends on CPM1 || (FSL_SOC && CPM && COMPILE_TEST)
 	depends on CPM_TSA
 	help
 	  Freescale CPM QUICC Multichannel Controller
Signature · 6 lines
~Randy

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

PATCH v2 2/2 serial: cpm_uart: Fix a COMPILE_TEST dependency

In reply to Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

This lead to:
depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)

This dependency does not make sense anymore and can be simplified removing all the COMPILE_TEST part.

Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
 drivers/tty/serial/Kconfig             | 2 +-
 drivers/tty/serial/cpm_uart/cpm_uart.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/Kconfig +1 -1
index 625358f44419..de092bc1289e 100644
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
 config SERIAL_CPM
 	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1
 	select SERIAL_CORE
 	help
 	  This driver supports the SCC and SMC serial ports on Motorola 
drivers/tty/serial/cpm_uart/cpm_uart.h +0 -2
index 0577618e78c0..46c03ed71c31 100644
@@ -19,8 +19,6 @@ struct gpio_desc;
 #include "cpm_uart_cpm2.h"
 #elif defined(CONFIG_CPM1)
 #include "cpm_uart_cpm1.h"
-#elif defined(CONFIG_COMPILE_TEST)
-#include "cpm_uart_cpm2.h"
 #endif
 
 #define SERIAL_CPM_MAJOR	204
Signature · 1 line
2.40.1
maintainer
#4 lore raw

Re: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

Quoted 4 lines · Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Quoted 8 lines

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

This lead to:

   depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)

This dependency does not make sense anymore and can be simplified removing all the COMPILE_TEST part.

Then it's the same as my revert:
https://lore.kernel.org/all/[email protected]/

:D

But nevermind.

Quoted 35 lines
Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
  drivers/tty/serial/Kconfig             | 2 +-
  drivers/tty/serial/cpm_uart/cpm_uart.h | 2 --
  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/Kconfig +1 -1
index 625358f44419..de092bc1289e 100644
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
  config SERIAL_CPM
  	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1
  	select SERIAL_CORE
  	help
  	  This driver supports the SCC and SMC serial ports on Motorola
drivers/tty/serial/cpm_uart/cpm_uart.h +0 -2
index 0577618e78c0..46c03ed71c31 100644
@@ -19,8 +19,6 @@ struct gpio_desc;
  #include "cpm_uart_cpm2.h"
  #elif defined(CONFIG_CPM1)
  #include "cpm_uart_cpm1.h"
-#elif defined(CONFIG_COMPILE_TEST)
-#include "cpm_uart_cpm2.h"
  #endif
 
  #define SERIAL_CPM_MAJOR	204
Signature · 2 lines
js
suse labs
#5 lore raw

Re: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

Quoted 14 lines · On Tue, 23 May 2023 11:13:02 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 4 lines · Herve Codina

In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set.

Quoted 8 lines

Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.

This lead to:

   depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)

This dependency does not make sense anymore and can be simplified removing all the COMPILE_TEST part.

Quoted 6 lines

Then it's the same as my revert:
https://lore.kernel.org/all/[email protected]/

:D

But nevermind.

Sorry, I didn't look at your revert.

Do you want a new iteration adding (same as your revert) ?

Best regards,
Hervé

Quoted 37 lines
Quoted 36 lines
Fixes e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
  drivers/tty/serial/Kconfig             | 2 +-
  drivers/tty/serial/cpm_uart/cpm_uart.h | 2 --
  2 files changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/Kconfig +1 -1
index 625358f44419..de092bc1289e 100644
@@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE
 
  config SERIAL_CPM
  	tristate "CPM SCC/SMC serial port support"
-	depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST)
+	depends on CPM2 || CPM1
  	select SERIAL_CORE
  	help
  	  This driver supports the SCC and SMC serial ports on Motorola
drivers/tty/serial/cpm_uart/cpm_uart.h +0 -2
index 0577618e78c0..46c03ed71c31 100644
@@ -19,8 +19,6 @@ struct gpio_desc;
  #include "cpm_uart_cpm2.h"
  #elif defined(CONFIG_CPM1)
  #include "cpm_uart_cpm1.h"
-#elif defined(CONFIG_COMPILE_TEST)
-#include "cpm_uart_cpm2.h"
  #endif
 
  #define SERIAL_CPM_MAJOR	204