2015-12-16 11:10:11

by Dan Carpenter

[permalink] [raw]
Subject: [patch] wil6210: fix a warning message condition

"iter" is -1 at the end of the loop and not zero. It means we don't
print a warning message.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 48687f1..4544e8c 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -985,7 +985,7 @@ int __wil_down(struct wil6210_priv *wil)
}
mutex_lock(&wil->mutex);

- if (!iter)
+ if (iter < 0)
wil_err(wil, "timeout waiting for idle FW/HW\n");

wil_reset(wil, false);


2015-12-31 13:13:23

by Kalle Valo

[permalink] [raw]
Subject: Re: [patch] wil6210: fix a warning message condition

Dan Carpenter <[email protected]> writes:

> "iter" is -1 at the end of the loop and not zero. It means we don't
> print a warning message.
>
> Signed-off-by: Dan Carpenter <[email protected]>

Applied to ath.git, thanks.

--
Kalle Valo

2015-12-16 12:56:09

by Maya Haim

[permalink] [raw]
Subject: RE: [patch] wil6210: fix a warning message condition

Acked-by: Maya Erez <[email protected]>

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Wednesday, December 16, 2015 1:10 PM
To: qca_merez
Cc: Kalle Valo; [email protected]; wil6210; [email protected]
Subject: [patch] wil6210: fix a warning message condition

"iter" is -1 at the end of the loop and not zero. It means we don't print a warning message.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 48687f1..4544e8c 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -985,7 +985,7 @@ int __wil_down(struct wil6210_priv *wil)
}
mutex_lock(&wil->mutex);

- if (!iter)
+ if (iter < 0)
wil_err(wil, "timeout waiting for idle FW/HW\n");

wil_reset(wil, false);