Skip to contentSkip to conversation

watchdog/sb_watchdog: fix compilation problem due to COMPILE_TEST

PATCH In review Jackie Liu 2 participants 2 messages Sep 13, 2021 Watchdog device drivers

lore
Share & tools
lore

Jackie Liu

author
#0 lore raw

PATCH 1/1 watchdog/sb_watchdog: fix compilation problem due to COMPILE_TEST

From: Jackie Liu <[email protected]>

Compiling sb_watchdog needs to clearly define SIBYTE_HDR_FEATURES. In arch/mips/sibyte/Platform like:

  cflags-$(CONFIG_SIBYTE_BCM112X) +=                                      \
                -I$(srctree)/arch/mips/include/asm/mach-sibyte          \
                -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL

Otherwise, SIBYTE_HDR_FEATURES is SIBYTE_HDR_FMASK_ALL. SIBYTE_HDR_FMASK_ALL is mean:

 #define SIBYTE_HDR_FMASK_ALL  SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \
				     | SIBYTE_HDR_FMASK_1480_ALL)

So, If not limited to CPU_SB1, we will get such an error:

arch/mips/include/asm/sibyte/bcm1480_scd.h:261: error: "M_SPC_CFG_CLEAR" redefined [-Werror] arch/mips/include/asm/sibyte/bcm1480_scd.h:262: error: "M_SPC_CFG_ENABLE" redefined [-Werror]

Fixes da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
index b81fe4f7d434..bf59faeb3de1 100644
@@ -1666,7 +1666,7 @@ config WDT_MTX1
 
 config SIBYTE_WDOG
 	tristate "Sibyte SoC hardware watchdog"
-	depends on CPU_SB1 || (MIPS && COMPILE_TEST)
+	depends on CPU_SB1
 	help
 	  Watchdog driver for the built in watchdog hardware in Sibyte
 	  SoC processors.  There are apparently two watchdog timers
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Jackie Liu

From: Jackie Liu <[email protected]>

Compiling sb_watchdog needs to clearly define SIBYTE_HDR_FEATURES. In arch/mips/sibyte/Platform like:

   cflags-$(CONFIG_SIBYTE_BCM112X) +=                                      \
                 -I$(srctree)/arch/mips/include/asm/mach-sibyte          \
                 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL

Otherwise, SIBYTE_HDR_FEATURES is SIBYTE_HDR_FMASK_ALL. SIBYTE_HDR_FMASK_ALL is mean:

  #define SIBYTE_HDR_FMASK_ALL  SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \
				     | SIBYTE_HDR_FMASK_1480_ALL)
Quoted 7 lines

So, If not limited to CPU_SB1, we will get such an error:

   arch/mips/include/asm/sibyte/bcm1480_scd.h:261: error: "M_SPC_CFG_CLEAR" redefined [-Werror]
   arch/mips/include/asm/sibyte/bcm1480_scd.h:262: error: "M_SPC_CFG_ENABLE" redefined [-Werror]
Fixes da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")

Guenter

Quoted 18 lines
---
  drivers/watchdog/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -1
index b81fe4f7d434..bf59faeb3de1 100644
@@ -1666,7 +1666,7 @@ config WDT_MTX1
 
  config SIBYTE_WDOG
  	tristate "Sibyte SoC hardware watchdog"
-	depends on CPU_SB1 || (MIPS && COMPILE_TEST)
+	depends on CPU_SB1
  	help
  	  Watchdog driver for the built in watchdog hardware in Sibyte
  	  SoC processors.  There are apparently two watchdog timers