Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345180

[PATCH] 3c59x: Ensure to apply the expires time

From Stafford Horne <shorne@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] 3c59x: Ensure to apply the expires time
Date 2016-02-28 09:00 +0100
Message-ID <r74qK-7yP-7@gated-at.bofh.it> (permalink)
References <r73El-7gX-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


In commit 5b6490def9168af6a ("3c59x: Use setup_timer()") Amitoj
removed add_timer which sets up the epires timer.  In this patch
the behavior is restore but it uses mod_timer which is a bit more
compact.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---

I think a patch like this will help restore the behavior. Also, 
its small cleanup since we dont need to do separate set to expire
and call to add_timer. But thats a style preference. 

 drivers/net/ethernet/3com/3c59x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
index c377607..7b881ed 100644
--- a/drivers/net/ethernet/3com/3c59x.c
+++ b/drivers/net/ethernet/3com/3c59x.c
@@ -1602,7 +1602,7 @@ vortex_up(struct net_device *dev)
 	}
 
 	setup_timer(&vp->timer, vortex_timer, (unsigned long)dev);
-	vp->timer.expires = RUN_AT(media_tbl[dev->if_port].wait);
+	mod_timer(&vp->timer, RUN_AT(media_tbl[dev->if_port].wait));
 	setup_timer(&vp->rx_oom_timer, rx_oom_timer, (unsigned long)dev);
 
 	if (vortex_debug > 1)
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] 3c59x: Use setup_timer() Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-02-24 15:00 +0100
  Re: [PATCH 3/3] 3c59x: Use setup_timer() David Miller <davem@davemloft.net> - 2016-02-25 23:00 +0100
    Re: [PATCH 3/3] 3c59x: Use setup_timer() Stafford Horne <shorne@gmail.com> - 2016-02-27 19:50 +0100
      Re: [PATCH 3/3] 3c59x: Use setup_timer() Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-02-28 08:10 +0100
        Re: [PATCH 3/3] 3c59x: Use setup_timer() Stafford Horne <shorne@gmail.com> - 2016-02-28 09:00 +0100
          Re: [PATCH 3/3] 3c59x: Use setup_timer() Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2016-02-28 09:20 +0100
        [PATCH] 3c59x: Ensure to apply the expires time Stafford Horne <shorne@gmail.com> - 2016-02-28 09:00 +0100
          Re: [PATCH] 3c59x: Ensure to apply the expires time David Miller <davem@davemloft.net> - 2016-02-29 05:50 +0100

csiph-web