From: kbuild test robot <lkp@intel.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
"Mauro Carvalho Chehab" <m.chehab@samsung.com>,
linux-media@vger.kernel.org,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>
Subject: drivers/media/platform/cadence/cdns-csi2tx.c:477:11: error: implicit declaration of function 'kzalloc'
Date: Fri, 22 Jun 2018 20:14:53 +0800 [thread overview]
Message-ID: <201806222046.Jlaf01SO%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3695 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 894b8c000ae6c106cc434ee0000dfb77df8bd9db
commit: 6f684d4fcce5eddd7e216a18975fb798d11a83dd media: v4l: cadence: Add Cadence MIPI-CSI2 TX driver
date: 5 weeks ago
config: x86_64-randconfig-u0-06221943 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
git checkout 6f684d4fcce5eddd7e216a18975fb798d11a83dd
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (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' [-Werror=implicit-function-declaration]
csi2tx = kzalloc(sizeof(*csi2tx), GFP_KERNEL);
^
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' [-Werror=implicit-function-declaration]
kfree(csi2tx);
^
cc1: some warnings being treated as errors
vim +/kzalloc +477 drivers/media/platform/cadence/cdns-csi2tx.c
470
471 static int csi2tx_probe(struct platform_device *pdev)
472 {
473 struct csi2tx_priv *csi2tx;
474 unsigned int i;
475 int ret;
476
> 477 csi2tx = kzalloc(sizeof(*csi2tx), GFP_KERNEL);
478 if (!csi2tx)
479 return -ENOMEM;
480 platform_set_drvdata(pdev, csi2tx);
481 mutex_init(&csi2tx->lock);
482 csi2tx->dev = &pdev->dev;
483
484 ret = csi2tx_get_resources(csi2tx, pdev);
485 if (ret)
486 goto err_free_priv;
487
488 v4l2_subdev_init(&csi2tx->subdev, &csi2tx_subdev_ops);
489 csi2tx->subdev.owner = THIS_MODULE;
490 csi2tx->subdev.dev = &pdev->dev;
491 csi2tx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
492 snprintf(csi2tx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s",
493 KBUILD_MODNAME, dev_name(&pdev->dev));
494
495 ret = csi2tx_check_lanes(csi2tx);
496 if (ret)
497 goto err_free_priv;
498
499 /* Create our media pads */
500 csi2tx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
501 csi2tx->pads[CSI2TX_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
502 for (i = CSI2TX_PAD_SINK_STREAM0; i < CSI2TX_PAD_MAX; i++)
503 csi2tx->pads[i].flags = MEDIA_PAD_FL_SINK;
504
505 /*
506 * Only the input pads are considered to have a format at the
507 * moment. The CSI link can multiplex various streams with
508 * different formats, and we can't expose this in v4l2 right
509 * now.
510 */
511 for (i = CSI2TX_PAD_SINK_STREAM0; i < CSI2TX_PAD_MAX; i++)
512 csi2tx->pad_fmts[i] = fmt_default;
513
514 ret = media_entity_pads_init(&csi2tx->subdev.entity, CSI2TX_PAD_MAX,
515 csi2tx->pads);
516 if (ret)
517 goto err_free_priv;
518
519 ret = v4l2_async_register_subdev(&csi2tx->subdev);
520 if (ret < 0)
521 goto err_free_priv;
522
523 dev_info(&pdev->dev,
524 "Probed CSI2TX with %u/%u lanes, %u streams, %s D-PHY\n",
525 csi2tx->num_lanes, csi2tx->max_lanes, csi2tx->max_streams,
526 csi2tx->has_internal_dphy ? "internal" : "no");
527
528 return 0;
529
530 err_free_priv:
> 531 kfree(csi2tx);
532 return ret;
533 }
534
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29635 bytes --]
reply other threads:[~2018-06-22 12:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201806222046.Jlaf01SO%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=maxime.ripard@bootlin.com \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®