[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202010121855.Z8e1qitG-lkp@intel.com>
Date: Mon, 12 Oct 2020 18:28:01 +0800
From: kernel test robot <lkp@...el.com>
To: Robin Murphy <robin.murphy@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Joerg Roedel <jroedel@...e.de>
Subject: drivers/gpu/drm/rockchip/rockchip_rgb.c:71:22: warning: no previous
prototype for 'rockchip_rgb_init'
Hi Robin,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bbf5c979011a099af5dc76498918ed7df445635b
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date: 3 months ago
config: nds32-randconfig-r006-20201012 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/rockchip/rockchip_rgb.c:71:22: warning: no previous prototype for 'rockchip_rgb_init' [-Wmissing-prototypes]
71 | struct rockchip_rgb *rockchip_rgb_init(struct device *dev,
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/rockchip/rockchip_rgb.c:159:6: warning: no previous prototype for 'rockchip_rgb_fini' [-Wmissing-prototypes]
159 | void rockchip_rgb_fini(struct rockchip_rgb *rgb)
| ^~~~~~~~~~~~~~~~~
vim +/rockchip_rgb_init +71 drivers/gpu/drm/rockchip/rockchip_rgb.c
1f0f0151517278 Sandy Huang 2018-08-30 70
1f0f0151517278 Sandy Huang 2018-08-30 @71 struct rockchip_rgb *rockchip_rgb_init(struct device *dev,
1f0f0151517278 Sandy Huang 2018-08-30 72 struct drm_crtc *crtc,
1f0f0151517278 Sandy Huang 2018-08-30 73 struct drm_device *drm_dev)
1f0f0151517278 Sandy Huang 2018-08-30 74 {
1f0f0151517278 Sandy Huang 2018-08-30 75 struct rockchip_rgb *rgb;
1f0f0151517278 Sandy Huang 2018-08-30 76 struct drm_encoder *encoder;
1f0f0151517278 Sandy Huang 2018-08-30 77 struct device_node *port, *endpoint;
1f0f0151517278 Sandy Huang 2018-08-30 78 u32 endpoint_id;
1f0f0151517278 Sandy Huang 2018-08-30 79 int ret = 0, child_count = 0;
1f0f0151517278 Sandy Huang 2018-08-30 80 struct drm_panel *panel;
1f0f0151517278 Sandy Huang 2018-08-30 81 struct drm_bridge *bridge;
1f0f0151517278 Sandy Huang 2018-08-30 82
1f0f0151517278 Sandy Huang 2018-08-30 83 rgb = devm_kzalloc(dev, sizeof(*rgb), GFP_KERNEL);
1f0f0151517278 Sandy Huang 2018-08-30 84 if (!rgb)
1f0f0151517278 Sandy Huang 2018-08-30 85 return ERR_PTR(-ENOMEM);
1f0f0151517278 Sandy Huang 2018-08-30 86
1f0f0151517278 Sandy Huang 2018-08-30 87 rgb->dev = dev;
1f0f0151517278 Sandy Huang 2018-08-30 88 rgb->drm_dev = drm_dev;
1f0f0151517278 Sandy Huang 2018-08-30 89
1f0f0151517278 Sandy Huang 2018-08-30 90 port = of_graph_get_port_by_id(dev->of_node, 0);
1f0f0151517278 Sandy Huang 2018-08-30 91 if (!port)
1f0f0151517278 Sandy Huang 2018-08-30 92 return ERR_PTR(-EINVAL);
1f0f0151517278 Sandy Huang 2018-08-30 93
1f0f0151517278 Sandy Huang 2018-08-30 94 for_each_child_of_node(port, endpoint) {
1f0f0151517278 Sandy Huang 2018-08-30 95 if (of_property_read_u32(endpoint, "reg", &endpoint_id))
1f0f0151517278 Sandy Huang 2018-08-30 96 endpoint_id = 0;
1f0f0151517278 Sandy Huang 2018-08-30 97
7cd7943dc55e0f Heiko Stuebner 2020-01-21 98 /* if subdriver (> 0) or error case (< 0), ignore entry */
7cd7943dc55e0f Heiko Stuebner 2020-01-21 99 if (rockchip_drm_endpoint_is_subdriver(endpoint) != 0)
1f0f0151517278 Sandy Huang 2018-08-30 100 continue;
1f0f0151517278 Sandy Huang 2018-08-30 101
1f0f0151517278 Sandy Huang 2018-08-30 102 child_count++;
1f0f0151517278 Sandy Huang 2018-08-30 103 ret = drm_of_find_panel_or_bridge(dev->of_node, 0, endpoint_id,
1f0f0151517278 Sandy Huang 2018-08-30 104 &panel, &bridge);
a17ce9960b3628 Julia Lawall 2019-01-13 105 if (!ret) {
a17ce9960b3628 Julia Lawall 2019-01-13 106 of_node_put(endpoint);
1f0f0151517278 Sandy Huang 2018-08-30 107 break;
1f0f0151517278 Sandy Huang 2018-08-30 108 }
a17ce9960b3628 Julia Lawall 2019-01-13 109 }
1f0f0151517278 Sandy Huang 2018-08-30 110
1f0f0151517278 Sandy Huang 2018-08-30 111 of_node_put(port);
1f0f0151517278 Sandy Huang 2018-08-30 112
1f0f0151517278 Sandy Huang 2018-08-30 113 /* if the rgb output is not connected to anything, just return */
1f0f0151517278 Sandy Huang 2018-08-30 114 if (!child_count)
1f0f0151517278 Sandy Huang 2018-08-30 115 return NULL;
1f0f0151517278 Sandy Huang 2018-08-30 116
1f0f0151517278 Sandy Huang 2018-08-30 117 if (ret < 0) {
1f0f0151517278 Sandy Huang 2018-08-30 118 if (ret != -EPROBE_DEFER)
1f0f0151517278 Sandy Huang 2018-08-30 119 DRM_DEV_ERROR(dev, "failed to find panel or bridge %d\n", ret);
1f0f0151517278 Sandy Huang 2018-08-30 120 return ERR_PTR(ret);
1f0f0151517278 Sandy Huang 2018-08-30 121 }
1f0f0151517278 Sandy Huang 2018-08-30 122
1f0f0151517278 Sandy Huang 2018-08-30 123 encoder = &rgb->encoder;
1f0f0151517278 Sandy Huang 2018-08-30 124 encoder->possible_crtcs = drm_crtc_mask(crtc);
1f0f0151517278 Sandy Huang 2018-08-30 125
0dbd735448bfdb Thomas Zimmermann 2020-03-05 126 ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_NONE);
1f0f0151517278 Sandy Huang 2018-08-30 127 if (ret < 0) {
1f0f0151517278 Sandy Huang 2018-08-30 128 DRM_DEV_ERROR(drm_dev->dev,
1f0f0151517278 Sandy Huang 2018-08-30 129 "failed to initialize encoder: %d\n", ret);
1f0f0151517278 Sandy Huang 2018-08-30 130 return ERR_PTR(ret);
1f0f0151517278 Sandy Huang 2018-08-30 131 }
1f0f0151517278 Sandy Huang 2018-08-30 132
1f0f0151517278 Sandy Huang 2018-08-30 133 drm_encoder_helper_add(encoder, &rockchip_rgb_encoder_helper_funcs);
1f0f0151517278 Sandy Huang 2018-08-30 134
1f0f0151517278 Sandy Huang 2018-08-30 135 if (panel) {
89958b7cd9555a Laurent Pinchart 2019-09-04 136 bridge = drm_panel_bridge_add_typed(panel,
89958b7cd9555a Laurent Pinchart 2019-09-04 137 DRM_MODE_CONNECTOR_LVDS);
1f0f0151517278 Sandy Huang 2018-08-30 138 if (IS_ERR(bridge))
1f0f0151517278 Sandy Huang 2018-08-30 139 return ERR_CAST(bridge);
1f0f0151517278 Sandy Huang 2018-08-30 140 }
1f0f0151517278 Sandy Huang 2018-08-30 141
1f0f0151517278 Sandy Huang 2018-08-30 142 rgb->bridge = bridge;
1f0f0151517278 Sandy Huang 2018-08-30 143
a25b988ff83f3c Laurent Pinchart 2020-02-26 144 ret = drm_bridge_attach(encoder, rgb->bridge, NULL, 0);
1f0f0151517278 Sandy Huang 2018-08-30 145 if (ret) {
1f0f0151517278 Sandy Huang 2018-08-30 146 DRM_DEV_ERROR(drm_dev->dev,
1f0f0151517278 Sandy Huang 2018-08-30 147 "failed to attach bridge: %d\n", ret);
1f0f0151517278 Sandy Huang 2018-08-30 148 goto err_free_encoder;
1f0f0151517278 Sandy Huang 2018-08-30 149 }
1f0f0151517278 Sandy Huang 2018-08-30 150
1f0f0151517278 Sandy Huang 2018-08-30 151 return rgb;
1f0f0151517278 Sandy Huang 2018-08-30 152
1f0f0151517278 Sandy Huang 2018-08-30 153 err_free_encoder:
1f0f0151517278 Sandy Huang 2018-08-30 154 drm_encoder_cleanup(encoder);
1f0f0151517278 Sandy Huang 2018-08-30 155 return ERR_PTR(ret);
1f0f0151517278 Sandy Huang 2018-08-30 156 }
1f0f0151517278 Sandy Huang 2018-08-30 157 EXPORT_SYMBOL_GPL(rockchip_rgb_init);
1f0f0151517278 Sandy Huang 2018-08-30 158
1f0f0151517278 Sandy Huang 2018-08-30 @159 void rockchip_rgb_fini(struct rockchip_rgb *rgb)
:::::: The code at line 71 was first introduced by commit
:::::: 1f0f015151727872be866b6a5b64e07f9e7a3071 drm/rockchip: Add support for Rockchip Soc RGB output interface
:::::: TO: Sandy Huang <hjc@...k-chips.com>
:::::: CC: Heiko Stuebner <heiko@...ech.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (36909 bytes)
Powered by blists - more mailing lists