diff mbox

spi: dw: Remove unused dw_spi_cleanup function

Message ID 1399547827.1783.1.camel@phoenix (mailing list archive)
State Accepted
Commit bf61fb805ce8f60a02c69abf249832bb306e2fe2
Headers show

Commit Message

Axel Lin May 8, 2014, 11:17 a.m. UTC
The dw_spi_cleanup() function was removed by commit c63f5da00845
"spi: dw: Don't call kfree for memory allocated by devm_kzalloc".

commit ec37e8e1f0e3 "spi: dw: migrate to generic queue infrastructure" added
dw_spi_cleanup() but never use it. So now I got below build warning:

  CC [M]  drivers/spi/spi-dw.o
drivers/spi/spi-dw.c:609:13: warning: 'dw_spi_cleanup' defined but not used [-Wunused-function]

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-dw.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Baruch Siach May 8, 2014, 11:31 a.m. UTC | #1
Hi Axel Lin,

On Thu, May 08, 2014 at 07:17:07PM +0800, Axel Lin wrote:
> The dw_spi_cleanup() function was removed by commit c63f5da00845
> "spi: dw: Don't call kfree for memory allocated by devm_kzalloc".
> 
> commit ec37e8e1f0e3 "spi: dw: migrate to generic queue infrastructure" added
> dw_spi_cleanup() but never use it. So now I got below build warning:
> 
>   CC [M]  drivers/spi/spi-dw.o
> drivers/spi/spi-dw.c:609:13: warning: 'dw_spi_cleanup' defined but not used [-Wunused-function]
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

> ---
>  drivers/spi/spi-dw.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
> index 9965e1b..29f3314 100644
> --- a/drivers/spi/spi-dw.c
> +++ b/drivers/spi/spi-dw.c
> @@ -606,12 +606,6 @@ static int dw_spi_setup(struct spi_device *spi)
>  	return 0;
>  }
>  
> -static void dw_spi_cleanup(struct spi_device *spi)
> -{
> -	struct chip_data *chip = spi_get_ctldata(spi);
> -	kfree(chip);
> -}
> -
>  /* Restart the controller, disable all interrupts, clean rx fifo */
>  static void spi_hw_init(struct dw_spi *dws)
>  {
> -- 
> 1.8.3.2
Mark Brown May 12, 2014, 9:04 p.m. UTC | #2
On Thu, May 08, 2014 at 07:17:07PM +0800, Axel Lin wrote:
> The dw_spi_cleanup() function was removed by commit c63f5da00845
> "spi: dw: Don't call kfree for memory allocated by devm_kzalloc".

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 9965e1b..29f3314 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -606,12 +606,6 @@  static int dw_spi_setup(struct spi_device *spi)
 	return 0;
 }
 
-static void dw_spi_cleanup(struct spi_device *spi)
-{
-	struct chip_data *chip = spi_get_ctldata(spi);
-	kfree(chip);
-}
-
 /* Restart the controller, disable all interrupts, clean rx fifo */
 static void spi_hw_init(struct dw_spi *dws)
 {