* [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error
@ 2018-06-08 21:19 Randy Dunlap
2018-06-11 7:36 ` Maxime Ripard
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-06-08 21:19 UTC (permalink / raw)
To: linux-media; +Cc: LKML, Maxime Ripard, Mauro Carvalho Chehab, Stephen Rothwell
From: Randy Dunlap <rdunlap@infradead.org>
Add #include <linux/slab.h> to fix build errors.
This driver uses kzalloc() and kfree() so it needs to #include
the appropriate header file for those interfaces.
Fixes these build errors:
../drivers/media/platform/cadence/cdns-csi2rx.c: In function 'csi2rx_probe':
../drivers/media/platform/cadence/cdns-csi2rx.c:421:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
../drivers/media/platform/cadence/cdns-csi2rx.c:421:9: warning: assignment makes pointer from integer without a cast [enabled by default]
csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
../drivers/media/platform/cadence/cdns-csi2rx.c:466:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
kfree(csi2rx);
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
---
drivers/media/platform/cadence/cdns-csi2rx.c | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20180608.orig/drivers/media/platform/cadence/cdns-csi2rx.c
+++ linux-next-20180608/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -13,6 +13,7 @@
#include <linux/of_graph.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/slab.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error
2018-06-08 21:19 [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error Randy Dunlap
@ 2018-06-11 7:36 ` Maxime Ripard
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2018-06-11 7:36 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-media, LKML, Mauro Carvalho Chehab, Stephen Rothwell
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
On Fri, Jun 08, 2018 at 02:19:06PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add #include <linux/slab.h> to fix build errors.
> This driver uses kzalloc() and kfree() so it needs to #include
> the appropriate header file for those interfaces.
>
> Fixes these build errors:
>
> ../drivers/media/platform/cadence/cdns-csi2rx.c: In function 'csi2rx_probe':
> ../drivers/media/platform/cadence/cdns-csi2rx.c:421:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
> csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
> ../drivers/media/platform/cadence/cdns-csi2rx.c:421:9: warning: assignment makes pointer from integer without a cast [enabled by default]
> csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
> ../drivers/media/platform/cadence/cdns-csi2rx.c:466:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
> kfree(csi2rx);
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Thanks!
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-11 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08 21:19 [PATCH -next] media/platform/cadence: add <linux/slab.h> to fix build error Randy Dunlap
2018-06-11 7:36 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox