2022-10-17 09:33:21

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable()

The function mchp_corespi_enable() is defined in the spi-microchip-core.c
file, but not called elsewhere, so delete this unused function.

drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2418
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/spi/spi-microchip-core.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index d352844c798c..aeaa1da88f39 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -119,15 +119,6 @@ static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg
writel(val, spi->regs + reg);
}

-static inline void mchp_corespi_enable(struct mchp_corespi *spi)
-{
- u32 control = mchp_corespi_read(spi, REG_CONTROL);
-
- control |= CONTROL_ENABLE;
-
- mchp_corespi_write(spi, REG_CONTROL, control);
-}
-
static inline void mchp_corespi_disable(struct mchp_corespi *spi)
{
u32 control = mchp_corespi_read(spi, REG_CONTROL);
--
2.20.1.7.g153144c


2022-10-17 10:18:33

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable()

On Mon, Oct 17, 2022 at 05:21:41PM +0800, Jiapeng Chong wrote:
> The function mchp_corespi_enable() is defined in the spi-microchip-core.c
> file, but not called elsewhere, so delete this unused function.
>
> drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2418
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>
> ---
> drivers/spi/spi-microchip-core.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index d352844c798c..aeaa1da88f39 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -119,15 +119,6 @@ static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg
> writel(val, spi->regs + reg);
> }
>
> -static inline void mchp_corespi_enable(struct mchp_corespi *spi)
> -{
> - u32 control = mchp_corespi_read(spi, REG_CONTROL);
> -
> - control |= CONTROL_ENABLE;
> -
> - mchp_corespi_write(spi, REG_CONTROL, control);
> -}

That's a bit silly... Thanks Jiapeng.
Reviewed-by: Conor Dooley <[email protected]>

> -
> static inline void mchp_corespi_disable(struct mchp_corespi *spi)
> {
> u32 control = mchp_corespi_read(spi, REG_CONTROL);
> --
> 2.20.1.7.g153144c
>

2022-10-18 12:50:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] spi: microchip-core: Remove the unused function mchp_corespi_enable()

On Mon, 17 Oct 2022 17:21:41 +0800, Jiapeng Chong wrote:
> The function mchp_corespi_enable() is defined in the spi-microchip-core.c
> file, but not called elsewhere, so delete this unused function.
>
> drivers/spi/spi-microchip-core.c:122:20: warning: unused function 'mchp_corespi_enable'.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: microchip-core: Remove the unused function mchp_corespi_enable()
commit: 8f4b3d2f653937956fdc68b665c621dfa3cf2fa7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark