* [PATCH] drivers:watchdog:remove unneeded variable
@ 2021-12-09 1:53 cgel.zte
2021-12-09 3:58 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-09 1:53 UTC (permalink / raw)
To: wim; +Cc: linux, linux-watchdog, linux-kernel, chiminghao, Zeal Robot
From: chiminghao <chi.minghao@zte.com.cn>
return value form directly instead of
taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
---
drivers/watchdog/pcwd_pci.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
index 54d86fcb1837..edbc0f28d399 100644
--- a/drivers/watchdog/pcwd_pci.c
+++ b/drivers/watchdog/pcwd_pci.c
@@ -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)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers:watchdog:remove unneeded variable
2021-12-09 1:53 [PATCH] drivers:watchdog:remove unneeded variable cgel.zte
@ 2021-12-09 3:58 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-12-09 3:58 UTC (permalink / raw)
To: cgel.zte, wim; +Cc: linux-watchdog, linux-kernel, chiminghao, Zeal Robot
On 12/8/21 5:53 PM, cgel.zte@gmail.com wrote:
> From: chiminghao <chi.minghao@zte.com.cn>
>
> return value form directly instead of
> taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
No, this is an old watchdog driver. Functional fixes for those only, please.
Guenter
> ---
> drivers/watchdog/pcwd_pci.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
> index 54d86fcb1837..edbc0f28d399 100644
> --- a/drivers/watchdog/pcwd_pci.c
> +++ b/drivers/watchdog/pcwd_pci.c
> @@ -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)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-09 3:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 1:53 [PATCH] drivers:watchdog:remove unneeded variable cgel.zte
2021-12-09 3:58 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.