netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup()
@ 2017-10-25 10:51 Kees Cook
  2017-10-27  3:09 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2017-10-25 10:51 UTC (permalink / raw)
  To: David S. Miller; +Cc: Jean-Paul Roubelat, linux-hams, netdev, linux-kernel

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly. Initialization was entirely missing.

Cc: Jean-Paul Roubelat <jpr@f6fbb.org>
Cc: linux-hams@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/hamradio/yam.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 7a7c5224a336..b88c5cc00a63 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -647,7 +647,7 @@ static void yam_arbitrate(struct net_device *dev)
 	yam_start_tx(dev, yp);
 }
 
-static void yam_dotimer(unsigned long dummy)
+static void yam_dotimer(struct timer_list *unused)
 {
 	int i;
 
@@ -1164,7 +1164,7 @@ static int __init yam_init_driver(void)
 
 	}
 
-	yam_timer.function = yam_dotimer;
+	timer_setup(&yam_timer, yam_dotimer, 0);
 	yam_timer.expires = jiffies + HZ / 100;
 	add_timer(&yam_timer);
 
-- 
2.7.4


-- 
Kees Cook
Pixel Security

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

* Re: [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup()
  2017-10-25 10:51 [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup() Kees Cook
@ 2017-10-27  3:09 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-10-27  3:09 UTC (permalink / raw)
  To: keescook; +Cc: jpr, linux-hams, netdev, linux-kernel

From: Kees Cook <keescook@chromium.org>
Date: Wed, 25 Oct 2017 03:51:20 -0700

> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly. Initialization was entirely missing.
> 
> Cc: Jean-Paul Roubelat <jpr@f6fbb.org>
> Cc: linux-hams@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Applied.

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

end of thread, other threads:[~2017-10-27  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 10:51 [PATCH] drivers/net: hamradio/yam: Convert timers to use timer_setup() Kees Cook
2017-10-27  3:09 ` David Miller

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).