Skip to contentSkip to conversation

watchdog: sc520_wdt: Remove unused variable

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: sc520_wdt: Remove unused variable

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

---
 drivers/watchdog/sc520_wdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/sc520_wdt.c +1 -2
index f353e18..1cfd3f6 100644
@@ -158,12 +158,11 @@ static void wdt_timer_ping(unsigned long data)
 
 static void wdt_config(int writeval)
 {
-	__u16 dummy;
 	unsigned long flags;
 
 	/* buy some time (ping) */
 	spin_lock_irqsave(&wdt_spinlock, flags);
-	dummy = readw(wdtmrctl);	/* ensure write synchronization */
+	readw(wdtmrctl);	/* ensure write synchronization */
 	writew(0xAAAA, wdtmrctl);
 	writew(0x5555, wdtmrctl);
 	/* unlock WDT = make WDT configuration register writable one time */
Signature · 1 line
1.8.3.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Alexander Shiyan

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

Quoted 30 lines
---
 drivers/watchdog/sc520_wdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/sc520_wdt.c +1 -2
index f353e18..1cfd3f6 100644
@@ -158,12 +158,11 @@ static void wdt_timer_ping(unsigned long data)
 
 static void wdt_config(int writeval)
 {
-	__u16 dummy;
 	unsigned long flags;
 
 	/* buy some time (ping) */
 	spin_lock_irqsave(&wdt_spinlock, flags);
-	dummy = readw(wdtmrctl);	/* ensure write synchronization */
+	readw(wdtmrctl);	/* ensure write synchronization */
 	writew(0xAAAA, wdtmrctl);
 	writew(0x5555, wdtmrctl);
 	/* unlock WDT = make WDT configuration register writable one time */
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
In reply to Alexander Shiyan

Hi Alexander,

Quoted 29 lines

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

---
 drivers/watchdog/sc520_wdt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/sc520_wdt.c +1 -2
index f353e18..1cfd3f6 100644
@@ -158,12 +158,11 @@ static void wdt_timer_ping(unsigned long data)
 
 static void wdt_config(int writeval)
 {
-	__u16 dummy;
 	unsigned long flags;
 
 	/* buy some time (ping) */
 	spin_lock_irqsave(&wdt_spinlock, flags);
-	dummy = readw(wdtmrctl);	/* ensure write synchronization */
+	readw(wdtmrctl);	/* ensure write synchronization */
 	writew(0xAAAA, wdtmrctl);
 	writew(0x5555, wdtmrctl);
 	/* unlock WDT = make WDT configuration register writable one time */
Signature · 1 line
1.8.3.2

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

Kind regards,
Wim.