mailbox: mchp-ipc-sbi: Fix COMPILE_TEST build error
authorYue Haibing <yuehaibing@huawei.com>
Fri, 11 Apr 2025 07:57:47 +0000 (15:57 +0800)
committerJassi Brar <jassisinghbrar@gmail.com>
Mon, 26 May 2025 21:23:38 +0000 (16:23 -0500)
If COMPILE_TEST is y but RISCV_SBI is n, build fails:

drivers/mailbox/mailbox-mchp-ipc-sbi.c: In function 'mchp_ipc_sbi_chan_send':
drivers/mailbox/mailbox-mchp-ipc-sbi.c:119:23: error: storage size of 'ret' isn't known
struct sbiret ret;
              ^~~
  CC      drivers/nvmem/lpc18xx_otp.o
drivers/mailbox/mailbox-mchp-ipc-sbi.c:121:15: error: implicit declaration of function 'sbi_ecall' [-Werror=implicit-function-declaration]
ret = sbi_ecall(SBI_EXT_MICROCHIP_TECHNOLOGY, command, channel,
      ^~~~~~~~~

move COMPILE_TEST to ARCH_MICROCHIP dependency as other drivers.

Fixes: e4b1d67e7141 ("mailbox: add Microchip IPC support")
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/Kconfig

index ed52db272f4d059ff60d608f40e3845411bc63f7..e8445cda7c6182d6157ea41aa86702020af83c12 100644 (file)
@@ -191,8 +191,8 @@ config POLARFIRE_SOC_MAILBOX
 
 config MCHP_SBI_IPC_MBOX
        tristate "Microchip Inter-processor Communication (IPC) SBI driver"
-       depends on RISCV_SBI || COMPILE_TEST
-       depends on ARCH_MICROCHIP
+       depends on RISCV_SBI
+       depends on ARCH_MICROCHIP || COMPILE_TEST
        help
          Mailbox implementation for Microchip devices with an
          Inter-process communication (IPC) controller.