projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8129e2a
)
tools/virtio: add kmalloc_array stub
author
Michael S. Tsirkin
<mst@redhat.com>
Wed, 25 Jul 2018 13:38:31 +0000
(16:38 +0300)
committer
Michael S. Tsirkin
<mst@redhat.com>
Fri, 27 Jul 2018 13:54:40 +0000
(16:54 +0300)
Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tools/virtio/linux/kernel.h
patch
|
blob
|
history
diff --git
a/tools/virtio/linux/kernel.h
b/tools/virtio/linux/kernel.h
index fca8381bbe041315d955f96e7e045d70d1cc89fb..fb22bccfbc8a7f2df651474211b48aa67efdf8f9 100644
(file)
--- a/
tools/virtio/linux/kernel.h
+++ b/
tools/virtio/linux/kernel.h
@@
-52,6
+52,11
@@
static inline void *kmalloc(size_t s, gfp_t gfp)
return __kmalloc_fake;
return malloc(s);
}
+static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)
+{
+ return kmalloc(n * s, gfp);
+}
+
static inline void *kzalloc(size_t s, gfp_t gfp)
{
void *p = kmalloc(s, gfp);