Skip to contentSkip to conversation

drivers:watchdog:remove unneeded variable

PATCH In review [email protected] 2 participants 2 messages Dec 9, 2021 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers:watchdog:remove unneeded variable

From: chiminghao <[email protected]>

return value form directly instead of
taking this in another redundant variable.

---
 drivers/watchdog/pcwd_pci.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/watchdog/pcwd_pci.c +1 -4
index 54d86fcb1837..edbc0f28d399 100644
@@ -215,10 +215,7 @@ static inline void pcipcwd_check_temperature_support(void)
 
 static int pcipcwd_get_option_switches(void)
 {
-	int option_switches;
-
-	option_switches = inb_p(pcipcwd_private.io_addr + 3);
-	return option_switches;
+	return inb_p(pcipcwd_private.io_addr + 3);
 }
 
 static void pcipcwd_show_card_info(void)
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 7 lines · On 12/8/21 5:53 PM, [email protected] wrote:

From: chiminghao <[email protected]>

return value form directly instead of
taking this in another redundant variable.

No, this is an old watchdog driver. Functional fixes for those only, please.

Guenter

Quoted 21 lines
---
  drivers/watchdog/pcwd_pci.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
drivers/watchdog/pcwd_pci.c +1 -4
index 54d86fcb1837..edbc0f28d399 100644
@@ -215,10 +215,7 @@ static inline void pcipcwd_check_temperature_support(void)
 
  static int pcipcwd_get_option_switches(void)
  {
-	int option_switches;
-
-	option_switches = inb_p(pcipcwd_private.io_addr + 3);
-	return option_switches;
+	return inb_p(pcipcwd_private.io_addr + 3);
  }
 
  static void pcipcwd_show_card_info(void)