From: kernel test robot <lkp@intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [sailus-media-tree:devel 23/23] drivers/media/platform/st/stm32/stm32-dcmi.c:1685:28: error: implicit declaration of function 'devm_kmemdup_array'; did you mean 'devm_kmalloc_array'?
Date: Mon, 10 Mar 2025 23:46:28 +0800 [thread overview]
Message-ID: <202503102326.NA0KFO8t-lkp@intel.com> (raw)
tree: git://linuxtv.org/sailus/media_tree.git devel
head: 07e07f2cd3ebb7e8b62ccb8f22a16032b599c9e2
commit: 07e07f2cd3ebb7e8b62ccb8f22a16032b599c9e2 [23/23] media: stm32-dcmi: use devm_kmemdup_array()
config: sparc-randconfig-001-20250310 (https://download.01.org/0day-ci/archive/20250310/202503102326.NA0KFO8t-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503102326.NA0KFO8t-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503102326.NA0KFO8t-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/media/platform/st/stm32/stm32-dcmi.c: In function 'dcmi_formats_init':
>> drivers/media/platform/st/stm32/stm32-dcmi.c:1685:28: error: implicit declaration of function 'devm_kmemdup_array'; did you mean 'devm_kmalloc_array'? [-Wimplicit-function-declaration]
1685 | dcmi->sd_formats = devm_kmemdup_array(dcmi->dev, sd_fmts, num_fmts,
| ^~~~~~~~~~~~~~~~~~
| devm_kmalloc_array
>> drivers/media/platform/st/stm32/stm32-dcmi.c:1685:26: error: assignment to 'const struct dcmi_format **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1685 | dcmi->sd_formats = devm_kmemdup_array(dcmi->dev, sd_fmts, num_fmts,
| ^
vim +1685 drivers/media/platform/st/stm32/stm32-dcmi.c
1639
1640 static int dcmi_formats_init(struct stm32_dcmi *dcmi)
1641 {
1642 const struct dcmi_format *sd_fmts[ARRAY_SIZE(dcmi_formats)];
1643 unsigned int num_fmts = 0, i, j;
1644 struct v4l2_subdev *subdev = dcmi->source;
1645 struct v4l2_subdev_mbus_code_enum mbus_code = {
1646 .which = V4L2_SUBDEV_FORMAT_ACTIVE,
1647 };
1648
1649 while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
1650 NULL, &mbus_code)) {
1651 for (i = 0; i < ARRAY_SIZE(dcmi_formats); i++) {
1652 if (dcmi_formats[i].mbus_code != mbus_code.code)
1653 continue;
1654
1655 /* Exclude JPEG if BT656 bus is selected */
1656 if (dcmi_formats[i].fourcc == V4L2_PIX_FMT_JPEG &&
1657 dcmi->bus_type == V4L2_MBUS_BT656)
1658 continue;
1659
1660 /* Code supported, have we got this fourcc yet? */
1661 for (j = 0; j < num_fmts; j++)
1662 if (sd_fmts[j]->fourcc ==
1663 dcmi_formats[i].fourcc) {
1664 /* Already available */
1665 dev_dbg(dcmi->dev, "Skipping fourcc/code: %4.4s/0x%x\n",
1666 (char *)&sd_fmts[j]->fourcc,
1667 mbus_code.code);
1668 break;
1669 }
1670 if (j == num_fmts) {
1671 /* New */
1672 sd_fmts[num_fmts++] = dcmi_formats + i;
1673 dev_dbg(dcmi->dev, "Supported fourcc/code: %4.4s/0x%x\n",
1674 (char *)&sd_fmts[num_fmts - 1]->fourcc,
1675 sd_fmts[num_fmts - 1]->mbus_code);
1676 }
1677 }
1678 mbus_code.index++;
1679 }
1680
1681 if (!num_fmts)
1682 return -ENXIO;
1683
1684 dcmi->num_of_sd_formats = num_fmts;
> 1685 dcmi->sd_formats = devm_kmemdup_array(dcmi->dev, sd_fmts, num_fmts,
1686 sizeof(sd_fmts[0]), GFP_KERNEL);
1687 if (!dcmi->sd_formats) {
1688 dev_err(dcmi->dev, "Could not allocate memory\n");
1689 return -ENOMEM;
1690 }
1691
1692 dcmi->sd_format = dcmi->sd_formats[0];
1693 return 0;
1694 }
1695
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-10 15:46 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=202503102326.NA0KFO8t-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-media@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=raag.jadav@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.