Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.12-rc3 next-20210318]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Xin-Ji/Add-MIPI-rx-DPI-support/2...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-randconfig-r014-20210318 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
fcc1ce00931751ac02498986feb37744e9ace8de)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://github.com/0day-ci/linux/commit/348257d12d5c847255eaf814081fe996a...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Ji/Add-MIPI-rx-DPI-support/20210319-104013
git checkout 348257d12d5c847255eaf814081fe996aeab1841
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/gpu/drm/bridge/analogix/anx7625.c:1333:6: warning:
variable 'mipi_lanes' is used uninitialized whenever 'if' condition is
false [-Wsometimes-uninitialized]
if (ep0) {
^~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1343:22: note: uninitialized use occurs here
pdata->mipi_lanes = mipi_lanes;
^~~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1333:2: note: remove the 'if' if its
condition is always true
if (ep0) {
^~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1321:26: note: initialize the variable
'mipi_lanes' to silence this warning
int bus_type, mipi_lanes;
^
= 0
> drivers/gpu/drm/bridge/analogix/anx7625.c:1333:6: warning:
variable 'bus_type' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (ep0) {
^~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1340:6: note: uninitialized use occurs here
if (bus_type == 5) /* bus type is Parallel(DSI) */
^~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1333:2: note: remove the 'if' if its
condition is always true
if (ep0) {
^~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:1321:14: note: initialize the variable
'bus_type' to silence this warning
int bus_type, mipi_lanes;
^
= 0
2 warnings generated.
vim +1333 drivers/gpu/drm/bridge/analogix/anx7625.c
1314
1315 static int anx7625_parse_dt(struct device *dev,
1316 struct anx7625_platform_data *pdata)
1317 {
1318 struct device_node *np = dev->of_node, *ep0;
1319 struct drm_panel *panel;
1320 int ret;
1321 int bus_type, mipi_lanes;
1322
1323 anx7625_get_swing_setting(dev, pdata);
1324
1325 pdata->is_dpi = 1; /* default dpi mode */
1326 pdata->mipi_host_node = of_graph_get_remote_node(np, 0, 0);
1327 if (!pdata->mipi_host_node) {
1328 DRM_DEV_ERROR(dev, "fail to get internal panel.\n");
1329 return -ENODEV;
1330 }
1331
1332 ep0 = of_graph_get_endpoint_by_regs(np, 0, 0);
1333 if (ep0) {
1334 if (of_property_read_u32(ep0,
"bus-type", &bus_type))
1335 bus_type = 0;
1336
1337 mipi_lanes = of_property_count_u32_elems(ep0, "data-lanes");
1338 }
1339
1340 if (bus_type == 5) /* bus type is Parallel(DSI) */
1341 pdata->is_dpi = 0;
1342
1343 pdata->mipi_lanes = mipi_lanes;
1344 if (pdata->mipi_lanes > MAX_LANES_SUPPORT || pdata->mipi_lanes <= 0)
1345 pdata->mipi_lanes = MAX_LANES_SUPPORT;
1346
1347 if (pdata->is_dpi)
1348 DRM_DEV_DEBUG_DRIVER(dev, "found MIPI DPI host node.\n");
1349 else
1350 DRM_DEV_DEBUG_DRIVER(dev, "found MIPI DSI host node.\n");
1351
1352 ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL);
1353 if (ret < 0) {
1354 if (ret == -ENODEV)
1355 return 0;
1356 return ret;
1357 }
1358 if (!panel)
1359 return -ENODEV;
1360
1361 pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
1362 if (IS_ERR(pdata->panel_bridge))
1363 return PTR_ERR(pdata->panel_bridge);
1364 DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n");
1365
1366 return 0;
1367 }
1368
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org