Skip to contentSkip to conversation

spi: dw: Remove unused dw_spi_cleanup function

PATCH Applied Axel Lin 3 participants 3 messages May 8, 2014 – May 12, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 spi: dw: Remove unused dw_spi_cleanup function

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]

---
 drivers/spi/spi-dw.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/spi/spi-dw.c +0 -6
index 9965e1b..29f3314 100644
@@ -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)
 {
Signature · 8 lines
1.8.3.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#1 lore raw

Hi Axel Lin,

Quoted 10 lines · Axel Lin

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]

Thanks,
baruch

Quoted 23 lines
---
 drivers/spi/spi-dw.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/spi/spi-dw.c +0 -6
index 9965e1b..29f3314 100644
@@ -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)
 {
Signature · 1 line
1.8.3.2
Signature · 7 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

The dw_spi_cleanup() function was removed by commit c63f5da00845 "spi: dw: Don't call kfree for memory allocated by devm_kzalloc".

Applied, thanks.