Skip to contentSkip to conversation

watchdog: shwdt: Remove unused variable

PATCH In review Alexander Shiyan 3 participants 4 messages Feb 15, 2014 – Feb 24, 2014 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: shwdt: Remove unused variable

Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable.

---
 drivers/watchdog/shwdt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/watchdog/shwdt.c +0 -2
index af3528f..d04d02b 100644
@@ -293,8 +293,6 @@ static int sh_wdt_probe(struct platform_device *pdev)
 
 static int sh_wdt_remove(struct platform_device *pdev)
 {
-	struct sh_wdt *wdt = platform_get_drvdata(pdev);
-
 	watchdog_unregister_device(&sh_wdt_dev);
 
 	pm_runtime_disable(&pdev->dev);
Signature · 1 line
1.8.3.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexander Shiyan

Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable.

Though you might as well remove the matching platform_set_drvdata() which is also unnecessary.

Quoted 25 lines
---
 drivers/watchdog/shwdt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/watchdog/shwdt.c +0 -2
index af3528f..d04d02b 100644
@@ -293,8 +293,6 @@ static int sh_wdt_probe(struct platform_device *pdev)
 
 static int sh_wdt_remove(struct platform_device *pdev)
 {
-	struct sh_wdt *wdt = platform_get_drvdata(pdev);
-
 	watchdog_unregister_device(&sh_wdt_dev);
 
 	pm_runtime_disable(&pdev->dev);
Signature · 6 lines
1.8.3.2

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

Суббота, 15 февраля 2014, 9:52 -08:00 от Guenter Roeck <[email protected]>:

Quoted 10 lines · Alexander Shiyan
Quoted 4 lines

Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable.

Though you might as well remove the matching platform_set_drvdata() which is also unnecessary.

Indeed. I'll do it in the next series. Thanks.

---

#3 lore raw
In reply to Alexander Shiyan

Hi Alexander,

Quoted 24 lines

Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable.

---
 drivers/watchdog/shwdt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/watchdog/shwdt.c +0 -2
index af3528f..d04d02b 100644
@@ -293,8 +293,6 @@ static int sh_wdt_probe(struct platform_device *pdev)
 
 static int sh_wdt_remove(struct platform_device *pdev)
 {
-	struct sh_wdt *wdt = platform_get_drvdata(pdev);
-
 	watchdog_unregister_device(&sh_wdt_dev);
 
 	pm_runtime_disable(&pdev->dev);
Signature · 1 line
1.8.3.2

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.