From: kbuild test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: kbuild-all@01.org, linux-media@vger.kernel.org,
akinobu.mita@gmail.com, robert.jarzmik@free.fr,
hverkuil@xs4all.nl, bparrot@ti.com
Subject: Re: [PATCH 4/4] ti-vpe: Parse local endpoint for properties, not the remote one
Date: Fri, 8 Mar 2019 05:25:42 +0800 [thread overview]
Message-ID: <201903080534.7rjVJMOP%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190305135602.24199-5-sakari.ailus@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 10941 bytes --]
Hi Sakari,
I love your patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.0 next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sakari-Ailus/V4L2-fwnode-framework-and-driver-fixes/20190308-042715
base: git://linuxtv.org/media_tree.git master
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/media//platform/ti-vpe/cal.c: In function 'of_cal_create_instance':
>> drivers/media//platform/ti-vpe/cal.c:1755:14: error: 'remote_ep' undeclared (first use in this function)
of_node_put(remote_ep);
^~~~~~~~~
drivers/media//platform/ti-vpe/cal.c:1755:14: note: each undeclared identifier is reported only once for each function it appears in
vim +/remote_ep +1755 drivers/media//platform/ti-vpe/cal.c
343e89a79 Benoit Parrot 2016-01-06 1642
343e89a79 Benoit Parrot 2016-01-06 1643 static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
343e89a79 Benoit Parrot 2016-01-06 1644 {
343e89a79 Benoit Parrot 2016-01-06 1645 struct platform_device *pdev = ctx->dev->pdev;
e8013a352 Sakari Ailus 2019-03-05 1646 struct device_node *ep_node, *port, *sensor_node, *parent;
859969b38 Sakari Ailus 2016-08-26 1647 struct v4l2_fwnode_endpoint *endpoint;
343e89a79 Benoit Parrot 2016-01-06 1648 struct v4l2_async_subdev *asd;
343e89a79 Benoit Parrot 2016-01-06 1649 u32 regval = 0;
343e89a79 Benoit Parrot 2016-01-06 1650 int ret, index, found_port = 0, lane;
343e89a79 Benoit Parrot 2016-01-06 1651
343e89a79 Benoit Parrot 2016-01-06 1652 parent = pdev->dev.of_node;
343e89a79 Benoit Parrot 2016-01-06 1653
343e89a79 Benoit Parrot 2016-01-06 1654 asd = &ctx->asd;
343e89a79 Benoit Parrot 2016-01-06 1655 endpoint = &ctx->endpoint;
343e89a79 Benoit Parrot 2016-01-06 1656
343e89a79 Benoit Parrot 2016-01-06 1657 ep_node = NULL;
343e89a79 Benoit Parrot 2016-01-06 1658 port = NULL;
343e89a79 Benoit Parrot 2016-01-06 1659 sensor_node = NULL;
343e89a79 Benoit Parrot 2016-01-06 1660 ret = -EINVAL;
343e89a79 Benoit Parrot 2016-01-06 1661
343e89a79 Benoit Parrot 2016-01-06 1662 ctx_dbg(3, ctx, "Scanning Port node for csi2 port: %d\n", inst);
343e89a79 Benoit Parrot 2016-01-06 1663 for (index = 0; index < CAL_NUM_CSI2_PORTS; index++) {
343e89a79 Benoit Parrot 2016-01-06 1664 port = of_get_next_port(parent, port);
343e89a79 Benoit Parrot 2016-01-06 1665 if (!port) {
343e89a79 Benoit Parrot 2016-01-06 1666 ctx_dbg(1, ctx, "No port node found for csi2 port:%d\n",
343e89a79 Benoit Parrot 2016-01-06 1667 index);
343e89a79 Benoit Parrot 2016-01-06 1668 goto cleanup_exit;
343e89a79 Benoit Parrot 2016-01-06 1669 }
343e89a79 Benoit Parrot 2016-01-06 1670
343e89a79 Benoit Parrot 2016-01-06 1671 /* Match the slice number with <REG> */
343e89a79 Benoit Parrot 2016-01-06 1672 of_property_read_u32(port, "reg", ®val);
343e89a79 Benoit Parrot 2016-01-06 1673 ctx_dbg(3, ctx, "port:%d inst:%d <reg>:%d\n",
343e89a79 Benoit Parrot 2016-01-06 1674 index, inst, regval);
343e89a79 Benoit Parrot 2016-01-06 1675 if ((regval == inst) && (index == inst)) {
343e89a79 Benoit Parrot 2016-01-06 1676 found_port = 1;
343e89a79 Benoit Parrot 2016-01-06 1677 break;
343e89a79 Benoit Parrot 2016-01-06 1678 }
343e89a79 Benoit Parrot 2016-01-06 1679 }
343e89a79 Benoit Parrot 2016-01-06 1680
343e89a79 Benoit Parrot 2016-01-06 1681 if (!found_port) {
343e89a79 Benoit Parrot 2016-01-06 1682 ctx_dbg(1, ctx, "No port node matches csi2 port:%d\n",
343e89a79 Benoit Parrot 2016-01-06 1683 inst);
343e89a79 Benoit Parrot 2016-01-06 1684 goto cleanup_exit;
343e89a79 Benoit Parrot 2016-01-06 1685 }
343e89a79 Benoit Parrot 2016-01-06 1686
343e89a79 Benoit Parrot 2016-01-06 1687 ctx_dbg(3, ctx, "Scanning sub-device for csi2 port: %d\n",
343e89a79 Benoit Parrot 2016-01-06 1688 inst);
343e89a79 Benoit Parrot 2016-01-06 1689
343e89a79 Benoit Parrot 2016-01-06 1690 ep_node = of_get_next_endpoint(port, ep_node);
343e89a79 Benoit Parrot 2016-01-06 1691 if (!ep_node) {
343e89a79 Benoit Parrot 2016-01-06 1692 ctx_dbg(3, ctx, "can't get next endpoint\n");
343e89a79 Benoit Parrot 2016-01-06 1693 goto cleanup_exit;
343e89a79 Benoit Parrot 2016-01-06 1694 }
343e89a79 Benoit Parrot 2016-01-06 1695
343e89a79 Benoit Parrot 2016-01-06 1696 sensor_node = of_graph_get_remote_port_parent(ep_node);
343e89a79 Benoit Parrot 2016-01-06 1697 if (!sensor_node) {
343e89a79 Benoit Parrot 2016-01-06 1698 ctx_dbg(3, ctx, "can't get remote parent\n");
343e89a79 Benoit Parrot 2016-01-06 1699 goto cleanup_exit;
343e89a79 Benoit Parrot 2016-01-06 1700 }
859969b38 Sakari Ailus 2016-08-26 1701 asd->match_type = V4L2_ASYNC_MATCH_FWNODE;
4e48afecd Mauro Carvalho Chehab 2017-09-27 1702 asd->match.fwnode = of_fwnode_handle(sensor_node);
343e89a79 Benoit Parrot 2016-01-06 1703
e8013a352 Sakari Ailus 2019-03-05 1704 v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep_node), endpoint);
343e89a79 Benoit Parrot 2016-01-06 1705
2d95e7ed0 Sakari Ailus 2018-07-03 1706 if (endpoint->bus_type != V4L2_MBUS_CSI2_DPHY) {
f764e6d68 Rob Herring 2018-08-27 1707 ctx_err(ctx, "Port:%d sub-device %pOFn is not a CSI2 device\n",
f764e6d68 Rob Herring 2018-08-27 1708 inst, sensor_node);
343e89a79 Benoit Parrot 2016-01-06 1709 goto cleanup_exit;
343e89a79 Benoit Parrot 2016-01-06 1710 }
343e89a79 Benoit Parrot 2016-01-06 1711
343e89a79 Benoit Parrot 2016-01-06 1712 /* Store Virtual Channel number */
343e89a79 Benoit Parrot 2016-01-06 1713 ctx->virtual_channel = endpoint->base.id;
343e89a79 Benoit Parrot 2016-01-06 1714
343e89a79 Benoit Parrot 2016-01-06 1715 ctx_dbg(3, ctx, "Port:%d v4l2-endpoint: CSI2\n", inst);
343e89a79 Benoit Parrot 2016-01-06 1716 ctx_dbg(3, ctx, "Virtual Channel=%d\n", ctx->virtual_channel);
343e89a79 Benoit Parrot 2016-01-06 1717 ctx_dbg(3, ctx, "flags=0x%08x\n", endpoint->bus.mipi_csi2.flags);
343e89a79 Benoit Parrot 2016-01-06 1718 ctx_dbg(3, ctx, "clock_lane=%d\n", endpoint->bus.mipi_csi2.clock_lane);
343e89a79 Benoit Parrot 2016-01-06 1719 ctx_dbg(3, ctx, "num_data_lanes=%d\n",
343e89a79 Benoit Parrot 2016-01-06 1720 endpoint->bus.mipi_csi2.num_data_lanes);
343e89a79 Benoit Parrot 2016-01-06 1721 ctx_dbg(3, ctx, "data_lanes= <\n");
343e89a79 Benoit Parrot 2016-01-06 1722 for (lane = 0; lane < endpoint->bus.mipi_csi2.num_data_lanes; lane++)
343e89a79 Benoit Parrot 2016-01-06 1723 ctx_dbg(3, ctx, "\t%d\n",
343e89a79 Benoit Parrot 2016-01-06 1724 endpoint->bus.mipi_csi2.data_lanes[lane]);
343e89a79 Benoit Parrot 2016-01-06 1725 ctx_dbg(3, ctx, "\t>\n");
343e89a79 Benoit Parrot 2016-01-06 1726
f764e6d68 Rob Herring 2018-08-27 1727 ctx_dbg(1, ctx, "Port: %d found sub-device %pOFn\n",
f764e6d68 Rob Herring 2018-08-27 1728 inst, sensor_node);
343e89a79 Benoit Parrot 2016-01-06 1729
d079f94c9 Steve Longerbeam 2018-09-29 1730 v4l2_async_notifier_init(&ctx->notifier);
d079f94c9 Steve Longerbeam 2018-09-29 1731
d079f94c9 Steve Longerbeam 2018-09-29 1732 ret = v4l2_async_notifier_add_subdev(&ctx->notifier, asd);
d079f94c9 Steve Longerbeam 2018-09-29 1733 if (ret) {
d079f94c9 Steve Longerbeam 2018-09-29 1734 ctx_err(ctx, "Error adding asd\n");
d079f94c9 Steve Longerbeam 2018-09-29 1735 goto cleanup_exit;
d079f94c9 Steve Longerbeam 2018-09-29 1736 }
d079f94c9 Steve Longerbeam 2018-09-29 1737
b6ee3f0dc Laurent Pinchart 2017-08-30 1738 ctx->notifier.ops = &cal_async_ops;
343e89a79 Benoit Parrot 2016-01-06 1739 ret = v4l2_async_notifier_register(&ctx->v4l2_dev,
343e89a79 Benoit Parrot 2016-01-06 1740 &ctx->notifier);
343e89a79 Benoit Parrot 2016-01-06 1741 if (ret) {
343e89a79 Benoit Parrot 2016-01-06 1742 ctx_err(ctx, "Error registering async notifier\n");
d079f94c9 Steve Longerbeam 2018-09-29 1743 v4l2_async_notifier_cleanup(&ctx->notifier);
343e89a79 Benoit Parrot 2016-01-06 1744 ret = -EINVAL;
343e89a79 Benoit Parrot 2016-01-06 1745 }
343e89a79 Benoit Parrot 2016-01-06 1746
d079f94c9 Steve Longerbeam 2018-09-29 1747 /*
d079f94c9 Steve Longerbeam 2018-09-29 1748 * On success we need to keep reference on sensor_node, or
d079f94c9 Steve Longerbeam 2018-09-29 1749 * if notifier_cleanup was called above, sensor_node was
d079f94c9 Steve Longerbeam 2018-09-29 1750 * already put.
d079f94c9 Steve Longerbeam 2018-09-29 1751 */
d079f94c9 Steve Longerbeam 2018-09-29 1752 sensor_node = NULL;
d079f94c9 Steve Longerbeam 2018-09-29 1753
343e89a79 Benoit Parrot 2016-01-06 1754 cleanup_exit:
343e89a79 Benoit Parrot 2016-01-06 @1755 of_node_put(remote_ep);
343e89a79 Benoit Parrot 2016-01-06 1756 of_node_put(sensor_node);
343e89a79 Benoit Parrot 2016-01-06 1757 of_node_put(ep_node);
343e89a79 Benoit Parrot 2016-01-06 1758 of_node_put(port);
343e89a79 Benoit Parrot 2016-01-06 1759
343e89a79 Benoit Parrot 2016-01-06 1760 return ret;
343e89a79 Benoit Parrot 2016-01-06 1761 }
343e89a79 Benoit Parrot 2016-01-06 1762
:::::: The code at line 1755 was first introduced by commit
:::::: 343e89a792a571b28b9c02850db7af2ef25ffb20 [media] media: ti-vpe: Add CAL v4l2 camera capture driver
:::::: TO: Benoit Parrot <bparrot@ti.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
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: 56338 bytes --]
prev parent reply other threads:[~2019-03-07 21:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 13:55 [PATCH 0/4] V4L2 fwnode framework and driver fixes Sakari Ailus
2019-03-05 13:55 ` [PATCH 1/4] v4l2-fwnode: Defaults may not override endpoint configuration in firmware Sakari Ailus
2019-03-05 13:56 ` [PATCH 2/4] v4l2-fwnode: The first default data lane is 0 on C-PHY Sakari Ailus
2019-03-05 13:56 ` [PATCH 3/4] pxa-camera: Match with device node, not the port node Sakari Ailus
2019-08-21 7:26 ` Robert Jarzmik
2019-08-21 8:24 ` Sakari Ailus
2019-03-05 13:56 ` [PATCH 4/4] ti-vpe: Parse local endpoint for properties, not the remote one Sakari Ailus
2019-03-05 14:02 ` [PATCH v1.1 " Sakari Ailus
2019-03-05 14:34 ` Benoit Parrot
2019-03-05 16:32 ` Sakari Ailus
2019-03-05 17:38 ` Benoit Parrot
2019-03-05 20:48 ` Sakari Ailus
2019-03-07 15:34 ` Benoit Parrot
2019-03-07 15:55 ` Sakari Ailus
2019-03-07 21:25 ` kbuild test robot [this message]
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=201903080534.7rjVJMOP%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akinobu.mita@gmail.com \
--cc=bparrot@ti.com \
--cc=hverkuil@xs4all.nl \
--cc=kbuild-all@01.org \
--cc=linux-media@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
--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;
as well as URLs for NNTP newsgroup(s).