]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog/sb_watchdog: fix compilation problem due to COMPILE_TEST
authorJackie Liu <liuyun01@kylinos.cn>
Mon, 13 Sep 2021 07:32:20 +0000 (15:32 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Sep 2021 18:57:19 +0000 (11:57 -0700)
commit7a027b99c52546e0abeef9d3372a062f01cf78fd
tree2551b68034bbe74714d118d468755027b1d55b2e
parentf19a4d880ac14db08490918b4105cedc8e61a763
watchdog/sb_watchdog: fix compilation problem due to COMPILE_TEST

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: 334d1fb69091 ("watchdog: Enable COMPILE_TEST where possible")
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/watchdog/Kconfig