* [B.A.T.M.A.N.] [PATCH] batman-adv: add compat RCU code for kernel < 2.6.37
@ 2013-03-16 10:49 Antonio Quartulli
2013-03-16 11:08 ` Marek Lindner
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2013-03-16 10:49 UTC (permalink / raw)
To: b.a.t.m.a.n
In linux version < 2.6.37 hlist_first_rcu() and hlist_next_rcu() do not exist
and therefore they need to be backported.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
compat.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/compat.h b/compat.h
index e1c6cd2..6a7e03b 100644
--- a/compat.h
+++ b/compat.h
@@ -129,6 +129,12 @@ static inline int batadv_param_set_copystring(const char *val,
#endif /* < KERNEL_VERSION(2, 6, 36) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
+
+#define hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first)))
+#define hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next)))
+
+#endif /* < KERNEL_VERSION(2, 6, 37) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
@@ -236,6 +242,7 @@ static int __batadv_interface_set_mac_addr(x, y)
ASSERT_RTNL();\
dev->master;\
})
+
#define hlist_entry_safe(ptr, type, member) \
(ptr) ? hlist_entry(ptr, type, member) : NULL
--
1.8.1.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add compat RCU code for kernel < 2.6.37
2013-03-16 10:49 [B.A.T.M.A.N.] [PATCH] batman-adv: add compat RCU code for kernel < 2.6.37 Antonio Quartulli
@ 2013-03-16 11:08 ` Marek Lindner
2013-03-16 11:15 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: Marek Lindner @ 2013-03-16 11:08 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Saturday, March 16, 2013 18:49:38 Antonio Quartulli wrote:
> @@ -236,6 +242,7 @@ static int __batadv_interface_set_mac_addr(x, y)
> ASSERT_RTNL();\
> dev->master;\
> })
> +
> #define hlist_entry_safe(ptr, type, member) \
> (ptr) ? hlist_entry(ptr, type, member) : NULL
Why the extra line here ?
Cheers,
Marek
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add compat RCU code for kernel < 2.6.37
2013-03-16 11:08 ` Marek Lindner
@ 2013-03-16 11:15 ` Antonio Quartulli
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Quartulli @ 2013-03-16 11:15 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
On Sat, Mar 16, 2013 at 07:08:43PM +0800, Marek Lindner wrote:
> On Saturday, March 16, 2013 18:49:38 Antonio Quartulli wrote:
> > @@ -236,6 +242,7 @@ static int __batadv_interface_set_mac_addr(x, y)
> > ASSERT_RTNL();\
> > dev->master;\
> > })
> > +
> > #define hlist_entry_safe(ptr, type, member) \
> > (ptr) ? hlist_entry(ptr, type, member) : NULL
>
> Why the extra line here ?
because at the beginning I put the new defines there, then I removed the defines
but I left the blank line...will send v2
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-16 11:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-16 10:49 [B.A.T.M.A.N.] [PATCH] batman-adv: add compat RCU code for kernel < 2.6.37 Antonio Quartulli
2013-03-16 11:08 ` Marek Lindner
2013-03-16 11:15 ` Antonio Quartulli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox