* [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work
@ 2015-12-28 15:43 Geliang Tang
2016-03-10 19:41 ` Sven Eckelmann
2016-03-28 15:05 ` Marek Lindner
0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2015-12-28 15:43 UTC (permalink / raw)
To: Marek Lindner, Simon Wunderlich, Antonio Quartulli,
David S. Miller
Cc: Geliang Tang, b.a.t.m.a.n, linux-kernel, netdev
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
net/batman-adv/bridge_loop_avoidance.c | 2 +-
net/batman-adv/distributed-arp-table.c | 2 +-
net/batman-adv/network-coding.c | 2 +-
net/batman-adv/originator.c | 2 +-
net/batman-adv/send.c | 4 ++--
net/batman-adv/translation-table.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index 99dcae3..4f47c82 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1183,7 +1183,7 @@ static void batadv_bla_periodic_work(struct work_struct *work)
struct batadv_hard_iface *primary_if;
int i;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_bla = container_of(delayed_work, struct batadv_priv_bla, work);
bat_priv = container_of(priv_bla, struct batadv_priv, bla);
primary_if = batadv_primary_if_get_selected(bat_priv);
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index a49c705..64facfc 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -138,7 +138,7 @@ static void batadv_dat_purge(struct work_struct *work)
struct batadv_priv_dat *priv_dat;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_dat = container_of(delayed_work, struct batadv_priv_dat, work);
bat_priv = container_of(priv_dat, struct batadv_priv, dat);
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index f5276be..a5ffe20 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -700,7 +700,7 @@ static void batadv_nc_worker(struct work_struct *work)
struct batadv_priv *bat_priv;
unsigned long timeout;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_nc = container_of(delayed_work, struct batadv_priv_nc, work);
bat_priv = container_of(priv_nc, struct batadv_priv, nc);
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 3c782a33..0eb5d01 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -1232,7 +1232,7 @@ static void batadv_purge_orig(struct work_struct *work)
struct delayed_work *delayed_work;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
bat_priv = container_of(delayed_work, struct batadv_priv, orig_work);
_batadv_purge_orig(bat_priv);
queue_delayed_work(batadv_event_workqueue,
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index f664324..848ce65 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -506,7 +506,7 @@ static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
struct net_device *soft_iface;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
forw_packet = container_of(delayed_work, struct batadv_forw_packet,
delayed_work);
soft_iface = forw_packet->if_incoming->soft_iface;
@@ -559,7 +559,7 @@ void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
struct batadv_forw_packet *forw_packet;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
forw_packet = container_of(delayed_work, struct batadv_forw_packet,
delayed_work);
bat_priv = netdev_priv(forw_packet->if_incoming->soft_iface);
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index ec67def..ed6fcc7 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -3157,7 +3157,7 @@ static void batadv_tt_purge(struct work_struct *work)
struct batadv_priv_tt *priv_tt;
struct batadv_priv *bat_priv;
- delayed_work = container_of(work, struct delayed_work, work);
+ delayed_work = to_delayed_work(work);
priv_tt = container_of(delayed_work, struct batadv_priv_tt, work);
bat_priv = container_of(priv_tt, struct batadv_priv, tt);
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work
2015-12-28 15:43 [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work Geliang Tang
@ 2016-03-10 19:41 ` Sven Eckelmann
2016-03-28 15:01 ` Sven Eckelmann
2016-03-28 15:05 ` Marek Lindner
1 sibling, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-03-10 19:41 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Geliang Tang, Antonio Quartulli, Marek Lindner
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
On Monday 28 December 2015 23:43:37 Geliang Tang wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> net/batman-adv/bridge_loop_avoidance.c | 2 +-
> net/batman-adv/distributed-arp-table.c | 2 +-
> net/batman-adv/network-coding.c | 2 +-
> net/batman-adv/originator.c | 2 +-
> net/batman-adv/send.c | 4 ++--
> net/batman-adv/translation-table.c | 2 +-
> 6 files changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Sven Eckelmann <sven@narfation.org>
@Marek, the compatibility code can be found at
https://git.open-mesh.org/batman-adv.git/patch/9122b42725c06a48dc222933722eb8b251335481
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work
2016-03-10 19:41 ` Sven Eckelmann
@ 2016-03-28 15:01 ` Sven Eckelmann
0 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2016-03-28 15:01 UTC (permalink / raw)
To: b.a.t.m.a.n, Marek Lindner
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
On Thursday 10 March 2016 20:41:53 Sven Eckelmann wrote:
[...]
> @Marek, the compatibility code can be found at
> https://git.open-mesh.org/batman-adv.git/patch/9122b42725c06a48dc222933722eb
> 8b251335481
This compatibility code isn't required anymore for the patch "batman-adv: use
to_delayed_work" because it would have only added support for a kernel which
is older than Linux 3.2.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work
2015-12-28 15:43 [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work Geliang Tang
2016-03-10 19:41 ` Sven Eckelmann
@ 2016-03-28 15:05 ` Marek Lindner
1 sibling, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2016-03-28 15:05 UTC (permalink / raw)
To: b.a.t.m.a.n
Cc: netdev, Antonio Quartulli, linux-kernel, Geliang Tang,
David S. Miller
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
On Monday, December 28, 2015 23:43:37 Geliang Tang wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> net/batman-adv/bridge_loop_avoidance.c | 2 +-
> net/batman-adv/distributed-arp-table.c | 2 +-
> net/batman-adv/network-coding.c | 2 +-
> net/batman-adv/originator.c | 2 +-
> net/batman-adv/send.c | 4 ++--
> net/batman-adv/translation-table.c | 2 +-
> 6 files changed, 7 insertions(+), 7 deletions(-)
Applied in the batman tree (revision ecc6f9a).
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-28 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-28 15:43 [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: use to_delayed_work Geliang Tang
2016-03-10 19:41 ` Sven Eckelmann
2016-03-28 15:01 ` Sven Eckelmann
2016-03-28 15:05 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox