* [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array()
@ 2014-06-13 9:21 Antonio Quartulli
2014-06-14 1:56 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2014-06-13 9:21 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
kmalloc_array() was introduced with linux-3.4 therefore
we need some compat code in order to be able to compile
batman-adv against older kernels.
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
Changes from v2:
- fix linux version in commit message
compat.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compat.h b/compat.h
index 5eb5fe6..28f4cfe 100644
--- a/compat.h
+++ b/compat.h
@@ -274,6 +274,8 @@ static inline void batadv_eth_hw_addr_random(struct net_device *dev)
random_ether_addr(dev->dev_addr);
}
+#define kmalloc_array(n, size, flags) kmalloc(n * size, flags)
+
#endif /* < KERNEL_VERSION(3, 4, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
--
1.8.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array()
2014-06-13 9:21 [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array() Antonio Quartulli
@ 2014-06-14 1:56 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2014-06-14 1:56 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
On Friday 13 June 2014 11:21:09 Antonio Quartulli wrote:
> kmalloc_array() was introduced with linux-3.4 therefore
> we need some compat code in order to be able to compile
> batman-adv against older kernels.
>
> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
> ---
>
> Changes from v2:
> - fix linux version in commit message
>
>
>
> compat.h | 2 ++
> 1 file changed, 2 insertions(+)
Applied in revision c38939d.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-14 1:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 9:21 [B.A.T.M.A.N.] [PATCHv2] batman-adv: add compat code for kmalloc_array() Antonio Quartulli
2014-06-14 1:56 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox