netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] net: af_packet: use setup_timer() helper.
@ 2017-09-25  7:30 Allen Pais
  2017-09-25  7:30 ` [PATCH v2 2/4] net: nfc: hci: " Allen Pais
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Allen Pais @ 2017-09-25  7:30 UTC (permalink / raw)
  To: netdev; +Cc: davem, sameo, Allen Pais

Use setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
v2: rebased to latest net-next.

 net/packet/af_packet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d288f52..b0f2218 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po,
 		struct tpacket_kbdq_core *pkc,
 		void (*func) (unsigned long))
 {
-	init_timer(&pkc->retire_blk_timer);
-	pkc->retire_blk_timer.data = (long)po;
-	pkc->retire_blk_timer.function = func;
+	setup_timer(&pkc->retire_blk_timer, func, (long)po);
 	pkc->retire_blk_timer.expires = jiffies;
 }
 
-- 
2.7.4

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

end of thread, other threads:[~2017-09-25 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25  7:30 [PATCH v2 1/4] net: af_packet: use setup_timer() helper Allen Pais
2017-09-25  7:30 ` [PATCH v2 2/4] net: nfc: hci: " Allen Pais
2017-09-25 20:19   ` David Miller
2017-09-25  7:30 ` [PATCH v2 3/4] net: nfc: hci: llc_shdlc: " Allen Pais
2017-09-25 20:19   ` David Miller
2017-09-25  7:30 ` [PATCH v2 4/4] net: nfc: llcp_core: " Allen Pais
2017-09-25 20:19   ` David Miller
2017-09-25 20:19 ` [PATCH v2 1/4] net: af_packet: " 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).