* [PATCH] mwifiex: use time_after()
@ 2014-05-25 17:59 Manuel Schölling
2014-05-27 18:36 ` Bing Zhao
0 siblings, 1 reply; 2+ messages in thread
From: Manuel Schölling @ 2014-05-25 17:59 UTC (permalink / raw)
To: bzhao
Cc: linville, linux-wireless, netdev, linux-kernel, kernel-janitors,
Manuel Schölling
To be future-proof and for better readability the time comparisons are
modified to use time_after() instead of plain, error-prone math.
Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
---
drivers/net/wireless/mwifiex/main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index d53e1e8..3191066 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -1101,7 +1101,7 @@ mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv)
return 0;
/* Clear csa channel, if DFS channel move time has passed */
- if (jiffies > priv->csa_expire_time) {
+ if (time_after(jiffies, priv->csa_expire_time)) {
priv->csa_chan = 0;
priv->csa_expire_time = 0;
}
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] mwifiex: use time_after()
2014-05-25 17:59 [PATCH] mwifiex: use time_after() Manuel Schölling
@ 2014-05-27 18:36 ` Bing Zhao
0 siblings, 0 replies; 2+ messages in thread
From: Bing Zhao @ 2014-05-27 18:36 UTC (permalink / raw)
To: Manuel Schölling
Cc: linville, linux-wireless, netdev, linux-kernel, kernel-janitors
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1122 bytes --]
Hi Manuel,
Thanks for the patch.
> To be future-proof and for better readability the time comparisons are
> modified to use time_after() instead of plain, error-prone math.
>
> Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Regards,
Bing
> ---
> drivers/net/wireless/mwifiex/main.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
> index d53e1e8..3191066 100644
> --- a/drivers/net/wireless/mwifiex/main.h
> +++ b/drivers/net/wireless/mwifiex/main.h
> @@ -1101,7 +1101,7 @@ mwifiex_11h_get_csa_closed_channel(struct mwifiex_private *priv)
> return 0;
>
> /* Clear csa channel, if DFS channel move time has passed */
> - if (jiffies > priv->csa_expire_time) {
> + if (time_after(jiffies, priv->csa_expire_time)) {
> priv->csa_chan = 0;
> priv->csa_expire_time = 0;
> }
> --
> 1.7.10.4
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-27 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-25 17:59 [PATCH] mwifiex: use time_after() Manuel Schölling
2014-05-27 18:36 ` Bing Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®