diff mbox series

spi: microchip-core: Remove the unused function mchp_corespi_enable()

Message ID 20221017092141.9789-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Not Applicable
Headers show
Series spi: microchip-core: Remove the unused function mchp_corespi_enable() | expand

Commit Message

Jiapeng Chong Oct. 17, 2022, 9:21 a.m. UTC
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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/spi/spi-microchip-core.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Conor Dooley Oct. 17, 2022, 9:49 a.m. UTC | #1
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 <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  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 <conor.dooley@microchip.com>

> -
>  static inline void mchp_corespi_disable(struct mchp_corespi *spi)
>  {
>  	u32 control = mchp_corespi_read(spi, REG_CONTROL);
> -- 
> 2.20.1.7.g153144c
>
Mark Brown Oct. 18, 2022, 12:45 p.m. UTC | #2
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
diff mbox series

Patch

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);