From: Muhammad Falak R Wani <hidden> Date: 2016-05-13 20:59:19
Use setup_timer() and instead of init_timer(), being the preferred way
of setting up a timer.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer() and mod_timer() to setup and arm a timer, making the
code compact and easier to read.
Signed-off-by: Muhammad Falak R Wani <redacted>
---
net/netfilter/ipset/ip_set_bitmap_gen.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
From: Muhammad Falak R Wani <hidden> Date: 2016-05-13 20:59:29
Use setup_timer() and instead of init_timer(), being the preferred way
of setting up a timer.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer() and mod_timer() to setup and arm a timer, making the
code compact and easier to read.
Signed-off-by: Muhammad Falak R Wani <redacted>
---
net/netfilter/ipset/ip_set_hash_gen.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
@@ -444,11 +444,8 @@ mtype_gc_init(struct ip_set *set, void (*gc)(unsigned long ul_set)){structhtype*h=set->data;-init_timer(&h->gc);-h->gc.data=(unsignedlong)set;-h->gc.function=gc;-h->gc.expires=jiffies+IPSET_GC_PERIOD(set->timeout)*HZ;-add_timer(&h->gc);+setup_timer(&h->gc,gc,(unsignedlong)set);+mod_timer(&h->gc,jiffies+IPSET_GC_PERIOD(set->timeout)*HZ);pr_debug("gc initialized, run in every %u\n",IPSET_GC_PERIOD(set->timeout));}
From: Muhammad Falak R Wani <hidden> Date: 2016-05-13 20:59:51
Use setup_timer() and instead of init_timer(), being the preferred way
of setting up a timer.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer() and mod_timer() to setup and arm a timer, making the
code compact and easier to read.
Signed-off-by: Muhammad Falak R Wani <redacted>
---
net/netfilter/ipset/ip_set_list_set.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Use setup_timer() and instead of init_timer(), being the preferred way
of setting up a timer.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer() and mod_timer() to setup and arm a timer, making the
code compact and easier to read.
Signed-off-by: Muhammad Falak R Wani <redacted>
---
net/netfilter/ipset/ip_set_bitmap_gen.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
The patch and the other too in the series as well are applied in the ipset
git repository and will be submitted for kernel inclusion. Thanks.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary