Skip to contentSkip to conversation

coda: coda-bit: Include "<linux/slab.h>"

PATCH In review Fabio Estevam 2 participants 2 messages Sep 19, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coda: coda-bit: Include "<linux/slab.h>"

From: Fabio Estevam <[email protected]>

coda-bit uses kmalloc/kfree functions, so the slab header needs to be included in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration] drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

---
 drivers/media/platform/coda/coda-bit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/coda/coda-bit.c +1 -0
index 07fc91a..9b8ea8b 100644
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
+#include <linux/slab.h>
 #include <linux/videodev2.h>
 
 #include <media/v4l2-common.h>
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw

Am Freitag, den 19.09.2014, 08:32 -0300 schrieb Fabio Estevam:

Quoted 20 lines

From: Fabio Estevam <[email protected]>

coda-bit uses kmalloc/kfree functions, so the slab header needs to be included in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration] drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

---
 drivers/media/platform/coda/coda-bit.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/coda/coda-bit.c +0 -0
index 07fc91a..9b8ea8b 100644

drivers/media/platform/coda/coda-bit.c line 23

Quoted 7 lines
drivers/media/platform/coda/coda-bit.c +1 -0
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
+#include <linux/slab.h>
 #include <linux/videodev2.h>
 
 #include <media/v4l2-common.h>

thanks
Philipp