Re: [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional compilation

From: Guenter Roeck
Date: Tue Apr 25 2023 - 11:09:08 EST


On Thu, Apr 20, 2023 at 05:46:15PM +0530, Dhruva Gole wrote:
> Get rid of conditional compilation based on CONFIG_PM_SLEEP because
> it may introduce build issues with certain configs where it maybe disabled
> This is because if above config is not enabled the suspend-resume
> functions are never part of the code but the bcm63xx_spi_pm_ops struct
> still inits them to non-existent suspend-resume functions.
>
> Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver")
>
> Signed-off-by: Dhruva Gole <d-gole@xxxxxx>

This patch results in:

drivers/spi/spi-bcm63xx.c:632:12: error: 'bcm63xx_spi_resume' defined but not used [-Werror=unused-function]
632 | static int bcm63xx_spi_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/spi/spi-bcm63xx.c:620:12: error: 'bcm63xx_spi_suspend' defined but not used [-Werror=unused-function]
620 | static int bcm63xx_spi_suspend(struct device *dev)

on architectures with no PM support (alpha, csky, m68k, openrisc, parisc,
riscv, s390).

Guenter