Linux-Watchdog Archive on lore.kernel.org
 help / Atom feed
* [PATCH -next] watchdog: pika_wdt: drop pointless static qualifier in pikawdt_init
@ 2019-01-23  9:05 YueHaibing
  2019-01-23 18:05 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-01-23  9:05 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-kernel, linux-watchdog, YueHaibing

There is no need to have the 'post1' variable static since
new value always be assigned before use it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/watchdog/pika_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index e0a6f8c..bb97f5b 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -225,7 +225,7 @@ static int __init pikawdt_init(void)
 {
 	struct device_node *np;
 	void __iomem *fpga;
-	static u32 post1;
+	u32 post1;
 	int ret;
 
 	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
-- 
2.7.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] watchdog: pika_wdt: drop pointless static qualifier in pikawdt_init
  2019-01-23  9:05 [PATCH -next] watchdog: pika_wdt: drop pointless static qualifier in pikawdt_init YueHaibing
@ 2019-01-23 18:05 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2019-01-23 18:05 UTC (permalink / raw)
  To: YueHaibing; +Cc: wim, linux-kernel, linux-watchdog

On Wed, Jan 23, 2019 at 05:05:24PM +0800, YueHaibing wrote:
> There is no need to have the 'post1' variable static since
> new value always be assigned before use it.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Is anyone still using this driver ? If yes it might make sense to convert
it to use the watchdog subsystem.

Guenter

> ---
>  drivers/watchdog/pika_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
> index e0a6f8c..bb97f5b 100644
> --- a/drivers/watchdog/pika_wdt.c
> +++ b/drivers/watchdog/pika_wdt.c
> @@ -225,7 +225,7 @@ static int __init pikawdt_init(void)
>  {
>  	struct device_node *np;
>  	void __iomem *fpga;
> -	static u32 post1;
> +	u32 post1;
>  	int ret;
>  
>  	np = of_find_compatible_node(NULL, NULL, "pika,fpga");
> -- 
> 2.7.0
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23  9:05 [PATCH -next] watchdog: pika_wdt: drop pointless static qualifier in pikawdt_init YueHaibing
2019-01-23 18:05 ` Guenter Roeck

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org linux-watchdog@archiver.kernel.org
	public-inbox-index linux-watchdog


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/ public-inbox