Re: drivers/media/platform/cadence/cdns-csi2tx.c:477:11: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?

From: Maxime Ripard
Date: Thu Jun 21 2018 - 10:30:19 EST


Hi randy,

On Wed, Jun 20, 2018 at 04:02:00PM -0700, Randy Dunlap wrote:
> On 06/17/2018 04:29 PM, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: ce397d215ccd07b8ae3f71db689aedb85d56ab40
> > commit: 6f684d4fcce5eddd7e216a18975fb798d11a83dd media: v4l: cadence: Add Cadence MIPI-CSI2 TX driver
> > date: 5 weeks ago
> > config: x86_64-randconfig-s5-06180700 (attached as .config)
> > compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> > reproduce:
> > git checkout 6f684d4fcce5eddd7e216a18975fb798d11a83dd
> > # save the attached .config to linux build tree
> > make ARCH=x86_64
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > drivers/media/platform/cadence/cdns-csi2tx.c: In function 'csi2tx_probe':
> >>> drivers/media/platform/cadence/cdns-csi2tx.c:477:11: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
> > csi2tx = kzalloc(sizeof(*csi2tx), GFP_KERNEL);
> > ^~~~~~~
> > vzalloc
> >>> drivers/media/platform/cadence/cdns-csi2tx.c:477:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> > csi2tx = kzalloc(sizeof(*csi2tx), GFP_KERNEL);
> > ^
> >>> drivers/media/platform/cadence/cdns-csi2tx.c:531:2: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
> > kfree(csi2tx);
> > ^~~~~
> > vfree
> > cc1: some warnings being treated as errors
>
> From 2018-06-08:
>
> https://patchwork.kernel.org/patch/10455245/
> or
> https://marc.info/?l=linux-kernel&m=152849276709302&w=2
>
> I marked it as for linux-next, but it does need to be applied to mainline.

This was fixed some time ago by Arnd, and the PR has been sent today,
so it should reach Linus some time soon:
https://patchwork.linuxtv.org/patch/50464/

Maxime

--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Attachment: signature.asc
Description: PGP signature