Skip to contentSkip to conversation

watchdog: intel_scu_watchdog: 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: intel_scu_watchdog: Remove unused variable

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

---
 drivers/watchdog/intel_scu_watchdog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/intel_scu_watchdog.c +1 -3
index e13e65e..0caab62 100644
@@ -211,7 +211,6 @@ static int intel_scu_set_heartbeat(u32 t)
 	int			 ipc_ret;
 	int			 retry_count;
 	u32			 soft_value;
-	u32			 hw_pre_value;
 	u32			 hw_value;
 
 	watchdog_device.timer_set = t;
@@ -273,8 +272,7 @@ static int intel_scu_set_heartbeat(u32 t)
 			watchdog_device.timer_load_count_addr);
 
 		/* read count value before starting timer */
-		hw_pre_value = ioread32(watchdog_device.timer_load_count_addr);
-		hw_pre_value = hw_pre_value & 0xFFFF0000;
+		ioread32(watchdog_device.timer_load_count_addr);
 
 		/* Start the timer */
 		iowrite32(0x00000003, watchdog_device.timer_control_addr);
Signature · 1 line
1.8.3.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alexander Shiyan

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

Quoted 34 lines
---
 drivers/watchdog/intel_scu_watchdog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/intel_scu_watchdog.c +1 -3
index e13e65e..0caab62 100644
@@ -211,7 +211,6 @@ static int intel_scu_set_heartbeat(u32 t)
 	int			 ipc_ret;
 	int			 retry_count;
 	u32			 soft_value;
-	u32			 hw_pre_value;
 	u32			 hw_value;
 
 	watchdog_device.timer_set = t;
@@ -273,8 +272,7 @@ static int intel_scu_set_heartbeat(u32 t)
 			watchdog_device.timer_load_count_addr);
 
 		/* read count value before starting timer */
-		hw_pre_value = ioread32(watchdog_device.timer_load_count_addr);
-		hw_pre_value = hw_pre_value & 0xFFFF0000;
+		ioread32(watchdog_device.timer_load_count_addr);
 
 		/* Start the timer */
 		iowrite32(0x00000003, watchdog_device.timer_control_addr);
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 34 lines

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

---
 drivers/watchdog/intel_scu_watchdog.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/intel_scu_watchdog.c +1 -3
index e13e65e..0caab62 100644
@@ -211,7 +211,6 @@ static int intel_scu_set_heartbeat(u32 t)
 	int			 ipc_ret;
 	int			 retry_count;
 	u32			 soft_value;
-	u32			 hw_pre_value;
 	u32			 hw_value;
 
 	watchdog_device.timer_set = t;
@@ -273,8 +272,7 @@ static int intel_scu_set_heartbeat(u32 t)
 			watchdog_device.timer_load_count_addr);
 
 		/* read count value before starting timer */
-		hw_pre_value = ioread32(watchdog_device.timer_load_count_addr);
-		hw_pre_value = hw_pre_value & 0xFFFF0000;
+		ioread32(watchdog_device.timer_load_count_addr);
 
 		/* Start the timer */
 		iowrite32(0x00000003, watchdog_device.timer_control_addr);
Signature · 1 line
1.8.3.2

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

Kind regards,
Wim.