From: kernel test robot <lkp@intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [sailus-media-tree:master 10/20] drivers/media/i2c/imx290.c:1526:19: error: call to undeclared function 'devm_cci_regmap_init_i2c'; ISO C99 and later do not support implicit function declarations
Date: Thu, 27 Jul 2023 16:47:49 +0800 [thread overview]
Message-ID: <202307271602.eGpiQHCZ-lkp@intel.com> (raw)
tree: git://linuxtv.org/sailus/media_tree.git master
head: 215e4463b11d94668b841368cb6882f3a2968148
commit: 51b1f81e3b15a4cf6c5c1bfd6bb14ff8bc9951fb [10/20] media: imx290: Convert to new CCI register access helpers
config: mips-randconfig-r013-20230727 (https://download.01.org/0day-ci/archive/20230727/202307271602.eGpiQHCZ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307271602.eGpiQHCZ-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/202307271602.eGpiQHCZ-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/media/i2c/imx290.c:1526:19: error: call to undeclared function 'devm_cci_regmap_init_i2c'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1526 | imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
| ^
drivers/media/i2c/imx290.c:1526:19: note: did you mean '__devm_regmap_init_i2c'?
include/linux/regmap.h:660:16: note: '__devm_regmap_init_i2c' declared here
660 | struct regmap *__devm_regmap_init_i2c(struct i2c_client *i2c,
| ^
>> drivers/media/i2c/imx290.c:1526:17: error: incompatible integer to pointer conversion assigning to 'struct regmap *' from 'int' [-Wint-conversion]
1526 | imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/devm_cci_regmap_init_i2c +1526 drivers/media/i2c/imx290.c
1514
1515 static int imx290_probe(struct i2c_client *client)
1516 {
1517 struct device *dev = &client->dev;
1518 struct imx290 *imx290;
1519 int ret;
1520
1521 imx290 = devm_kzalloc(dev, sizeof(*imx290), GFP_KERNEL);
1522 if (!imx290)
1523 return -ENOMEM;
1524
1525 imx290->dev = dev;
> 1526 imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
1527 if (IS_ERR(imx290->regmap)) {
1528 dev_err(dev, "Unable to initialize I2C\n");
1529 return -ENODEV;
1530 }
1531
1532 ret = imx290_parse_dt(imx290);
1533 if (ret)
1534 return ret;
1535
1536 /* Acquire resources. */
1537 imx290->xclk = devm_clk_get(dev, "xclk");
1538 if (IS_ERR(imx290->xclk))
1539 return dev_err_probe(dev, PTR_ERR(imx290->xclk),
1540 "Could not get xclk\n");
1541
1542 ret = imx290_get_regulators(dev, imx290);
1543 if (ret < 0)
1544 return dev_err_probe(dev, ret, "Cannot get regulators\n");
1545
1546 imx290->rst_gpio = devm_gpiod_get_optional(dev, "reset",
1547 GPIOD_OUT_HIGH);
1548 if (IS_ERR(imx290->rst_gpio))
1549 return dev_err_probe(dev, PTR_ERR(imx290->rst_gpio),
1550 "Cannot get reset gpio\n");
1551
1552 /* Initialize external clock frequency. */
1553 ret = imx290_init_clk(imx290);
1554 if (ret)
1555 return ret;
1556
1557 /*
1558 * Enable power management. The driver supports runtime PM, but needs to
1559 * work when runtime PM is disabled in the kernel. To that end, power
1560 * the sensor on manually here.
1561 */
1562 ret = imx290_power_on(imx290);
1563 if (ret < 0) {
1564 dev_err(dev, "Could not power on the device\n");
1565 return ret;
1566 }
1567
1568 /*
1569 * Enable runtime PM with autosuspend. As the device has been powered
1570 * manually, mark it as active, and increase the usage count without
1571 * resuming the device.
1572 */
1573 pm_runtime_set_active(dev);
1574 pm_runtime_get_noresume(dev);
1575 pm_runtime_enable(dev);
1576 pm_runtime_set_autosuspend_delay(dev, 1000);
1577 pm_runtime_use_autosuspend(dev);
1578
1579 /* Initialize the V4L2 subdev. */
1580 ret = imx290_subdev_init(imx290);
1581 if (ret)
1582 goto err_pm;
1583
1584 v4l2_i2c_subdev_set_name(&imx290->sd, client,
1585 imx290->model->name, NULL);
1586
1587 /*
1588 * Finally, register the V4L2 subdev. This must be done after
1589 * initializing everything as the subdev can be used immediately after
1590 * being registered.
1591 */
1592 ret = v4l2_async_register_subdev(&imx290->sd);
1593 if (ret < 0) {
1594 dev_err(dev, "Could not register v4l2 device\n");
1595 goto err_subdev;
1596 }
1597
1598 /*
1599 * Decrease the PM usage count. The device will get suspended after the
1600 * autosuspend delay, turning the power off.
1601 */
1602 pm_runtime_mark_last_busy(dev);
1603 pm_runtime_put_autosuspend(dev);
1604
1605 return 0;
1606
1607 err_subdev:
1608 imx290_subdev_cleanup(imx290);
1609 err_pm:
1610 pm_runtime_disable(dev);
1611 pm_runtime_put_noidle(dev);
1612 imx290_power_off(imx290);
1613 return ret;
1614 }
1615
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-07-27 8:48 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=202307271602.eGpiQHCZ-lkp@intel.com \
--to=lkp@intel.com \
--cc=hdegoede@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--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.