linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethernet: micrel: use time_after_eq macro
@ 2015-06-05 14:37 Antonio Murdaca
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Murdaca @ 2015-06-05 14:37 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, joe, julia.lawall, akpm, Antonio Murdaca

use time_after_eq macro for time comparison

Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
---
 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 48d2aec..9bce30c 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6689,7 +6689,7 @@ static void mib_monitor(unsigned long ptr)
 
 	/* This is used to verify Wake-on-LAN is working. */
 	if (hw_priv->pme_wait) {
-		if (hw_priv->pme_wait <= jiffies) {
+		if (time_after_eq(jiffies, hw_priv->pme_wait)) {
 			hw_clr_wol_pme_status(&hw_priv->hw);
 			hw_priv->pme_wait = 0;
 		}
-- 
2.4.2


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

* Re: [PATCH] ethernet: micrel: use time_after_eq macro
  2015-06-05 15:45 ` Julia Lawall
@ 2015-06-05 16:54   ` Antonio Murdaca
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Murdaca @ 2015-06-05 16:54 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Antonio Murdaca, davem, netdev, linux-kernel, joe, akpm

I'll use that then and resubmit this patch

Thanks

2015-06-05 17:45 GMT+02:00 Julia Lawall <julia.lawall@lip6.fr>:
> On Fri, 5 Jun 2015, Antonio Murdaca wrote:
>
>> use time_after_eq macro for time comparison
>>
>> Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
>> ---
>>  drivers/net/ethernet/micrel/ksz884x.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
>> index 48d2aec..9bce30c 100644
>> --- a/drivers/net/ethernet/micrel/ksz884x.c
>> +++ b/drivers/net/ethernet/micrel/ksz884x.c
>> @@ -6689,7 +6689,7 @@ static void mib_monitor(unsigned long ptr)
>>
>>       /* This is used to verify Wake-on-LAN is working. */
>>       if (hw_priv->pme_wait) {
>> -             if (hw_priv->pme_wait <= jiffies) {
>> +             if (time_after_eq(jiffies, hw_priv->pme_wait)) {
>
> There is also time_is_before_eq_jiffies.
>
> julia
>
>>                       hw_clr_wol_pme_status(&hw_priv->hw);
>>                       hw_priv->pme_wait = 0;
>>               }
>> --
>> 2.4.2
>>
>>



-- 
Antonio Murdaca

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

* Re: [PATCH] ethernet: micrel: use time_after_eq macro
  2015-06-05 14:30 Antonio Murdaca
@ 2015-06-05 15:45 ` Julia Lawall
  2015-06-05 16:54   ` Antonio Murdaca
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2015-06-05 15:45 UTC (permalink / raw)
  To: Antonio Murdaca; +Cc: davem, netdev, linux-kernel, joe, julia.lawall, akpm

On Fri, 5 Jun 2015, Antonio Murdaca wrote:

> use time_after_eq macro for time comparison
>
> Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
> ---
>  drivers/net/ethernet/micrel/ksz884x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
> index 48d2aec..9bce30c 100644
> --- a/drivers/net/ethernet/micrel/ksz884x.c
> +++ b/drivers/net/ethernet/micrel/ksz884x.c
> @@ -6689,7 +6689,7 @@ static void mib_monitor(unsigned long ptr)
>
>  	/* This is used to verify Wake-on-LAN is working. */
>  	if (hw_priv->pme_wait) {
> -		if (hw_priv->pme_wait <= jiffies) {
> +		if (time_after_eq(jiffies, hw_priv->pme_wait)) {

There is also time_is_before_eq_jiffies.

julia

>  			hw_clr_wol_pme_status(&hw_priv->hw);
>  			hw_priv->pme_wait = 0;
>  		}
> --
> 2.4.2
>
>

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

* [PATCH] ethernet: micrel: use time_after_eq macro
@ 2015-06-05 14:42 Antonio Murdaca
  0 siblings, 0 replies; 5+ messages in thread
From: Antonio Murdaca @ 2015-06-05 14:42 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, joe, julia.lawall, akpm, Antonio Murdaca

use time_after_eq macro for time comparison

Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
---
 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 48d2aec..9bce30c 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6689,7 +6689,7 @@ static void mib_monitor(unsigned long ptr)
 
 	/* This is used to verify Wake-on-LAN is working. */
 	if (hw_priv->pme_wait) {
-		if (hw_priv->pme_wait <= jiffies) {
+		if (time_after_eq(jiffies, hw_priv->pme_wait)) {
 			hw_clr_wol_pme_status(&hw_priv->hw);
 			hw_priv->pme_wait = 0;
 		}
-- 
2.4.2


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

* [PATCH] ethernet: micrel: use time_after_eq macro
@ 2015-06-05 14:30 Antonio Murdaca
  2015-06-05 15:45 ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Antonio Murdaca @ 2015-06-05 14:30 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, joe, julia.lawall, akpm, Antonio Murdaca

use time_after_eq macro for time comparison

Signed-off-by: Antonio Murdaca <antonio.murdaca@gmail.com>
---
 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 48d2aec..9bce30c 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6689,7 +6689,7 @@ static void mib_monitor(unsigned long ptr)
 
 	/* This is used to verify Wake-on-LAN is working. */
 	if (hw_priv->pme_wait) {
-		if (hw_priv->pme_wait <= jiffies) {
+		if (time_after_eq(jiffies, hw_priv->pme_wait)) {
 			hw_clr_wol_pme_status(&hw_priv->hw);
 			hw_priv->pme_wait = 0;
 		}
-- 
2.4.2


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

end of thread, other threads:[~2015-06-05 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05 14:37 [PATCH] ethernet: micrel: use time_after_eq macro Antonio Murdaca
  -- strict thread matches above, loose matches on Subject: below --
2015-06-05 14:42 Antonio Murdaca
2015-06-05 14:30 Antonio Murdaca
2015-06-05 15:45 ` Julia Lawall
2015-06-05 16:54   ` Antonio Murdaca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).