[jsarha:topic/chromeos-4.19-s0ix 7737/9999] drivers/gpu/drm/bridge/parade-ps8640.c:399:5: warning: no previous prototype for function 'ps8640_bridge_attach'

From: kernel test robot
Date: Mon Jun 13 2022 - 17:07:54 EST


Hi Hsin-Yi,

FYI, the error/warning still remains.

tree: https://github.com/jsarha/linux topic/chromeos-4.19-s0ix
head: 430bdaa0a8c38697780f45a148964d71951df11f
commit: e09a9439c5a794b24f73e6909d8eba778e3e3041 [7737/9999] FIXUP: FROMLIST: drm/bridge: Add I2C based driver for ps8640 bridge
config: x86_64-randconfig-a001-20220613 (https://download.01.org/0day-ci/archive/20220614/202206140423.YnAsdC2D-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d378268ead93c85803c270277f0243737b536ae7)
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://github.com/jsarha/linux/commit/e09a9439c5a794b24f73e6909d8eba778e3e3041
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/chromeos-4.19-s0ix
git checkout e09a9439c5a794b24f73e6909d8eba778e3e3041
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/bridge/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/bridge/parade-ps8640.c:399:5: warning: no previous prototype for function 'ps8640_bridge_attach' [-Wmissing-prototypes]
int ps8640_bridge_attach(struct drm_bridge *bridge)
^
drivers/gpu/drm/bridge/parade-ps8640.c:399:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ps8640_bridge_attach(struct drm_bridge *bridge)
^
static
1 warning generated.


vim +/ps8640_bridge_attach +399 drivers/gpu/drm/bridge/parade-ps8640.c

71e4156c5ec43f7 Jitao Shi 2016-11-14 398
71e4156c5ec43f7 Jitao Shi 2016-11-14 @399 int ps8640_bridge_attach(struct drm_bridge *bridge)
71e4156c5ec43f7 Jitao Shi 2016-11-14 400 {
71e4156c5ec43f7 Jitao Shi 2016-11-14 401 struct ps8640 *ps_bridge = bridge_to_ps8640(bridge);
71e4156c5ec43f7 Jitao Shi 2016-11-14 402 struct device *dev = &ps_bridge->page[0]->dev;
71e4156c5ec43f7 Jitao Shi 2016-11-14 403 struct device_node *in_ep, *dsi_node = NULL;
71e4156c5ec43f7 Jitao Shi 2016-11-14 404 struct mipi_dsi_device *dsi;
71e4156c5ec43f7 Jitao Shi 2016-11-14 405 struct mipi_dsi_host *host = NULL;
71e4156c5ec43f7 Jitao Shi 2016-11-14 406 int ret;
71e4156c5ec43f7 Jitao Shi 2016-11-14 407 const struct mipi_dsi_device_info info = { .type = "ps8640",
71e4156c5ec43f7 Jitao Shi 2016-11-14 408 .channel = 0,
71e4156c5ec43f7 Jitao Shi 2016-11-14 409 .node = NULL,
71e4156c5ec43f7 Jitao Shi 2016-11-14 410 };
71e4156c5ec43f7 Jitao Shi 2016-11-14 411
71e4156c5ec43f7 Jitao Shi 2016-11-14 412 ret = drm_connector_init(bridge->dev, &ps_bridge->connector,
71e4156c5ec43f7 Jitao Shi 2016-11-14 413 &ps8640_connector_funcs,
71e4156c5ec43f7 Jitao Shi 2016-11-14 414 DRM_MODE_CONNECTOR_eDP);
71e4156c5ec43f7 Jitao Shi 2016-11-14 415
71e4156c5ec43f7 Jitao Shi 2016-11-14 416 if (ret) {
71e4156c5ec43f7 Jitao Shi 2016-11-14 417 DRM_ERROR("Failed to initialize connector with drm: %d\n", ret);
71e4156c5ec43f7 Jitao Shi 2016-11-14 418 return ret;
71e4156c5ec43f7 Jitao Shi 2016-11-14 419 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 420
71e4156c5ec43f7 Jitao Shi 2016-11-14 421 drm_connector_helper_add(&ps_bridge->connector,
71e4156c5ec43f7 Jitao Shi 2016-11-14 422 &ps8640_connector_helper_funcs);
71e4156c5ec43f7 Jitao Shi 2016-11-14 423
71e4156c5ec43f7 Jitao Shi 2016-11-14 424 ps_bridge->connector.dpms = DRM_MODE_DPMS_ON;
e09a9439c5a794b Hsin-Yi Wang 2019-07-18 425 drm_connector_attach_encoder(&ps_bridge->connector,
71e4156c5ec43f7 Jitao Shi 2016-11-14 426 bridge->encoder);
71e4156c5ec43f7 Jitao Shi 2016-11-14 427
71e4156c5ec43f7 Jitao Shi 2016-11-14 428 if (ps_bridge->panel)
71e4156c5ec43f7 Jitao Shi 2016-11-14 429 drm_panel_attach(ps_bridge->panel, &ps_bridge->connector);
71e4156c5ec43f7 Jitao Shi 2016-11-14 430
71e4156c5ec43f7 Jitao Shi 2016-11-14 431 /* port@0 is ps8640 dsi input port */
71e4156c5ec43f7 Jitao Shi 2016-11-14 432 in_ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
71e4156c5ec43f7 Jitao Shi 2016-11-14 433 if (in_ep) {
71e4156c5ec43f7 Jitao Shi 2016-11-14 434 dsi_node = of_graph_get_remote_port_parent(in_ep);
71e4156c5ec43f7 Jitao Shi 2016-11-14 435 of_node_put(in_ep);
71e4156c5ec43f7 Jitao Shi 2016-11-14 436 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 437
71e4156c5ec43f7 Jitao Shi 2016-11-14 438 if (dsi_node) {
71e4156c5ec43f7 Jitao Shi 2016-11-14 439 host = of_find_mipi_dsi_host_by_node(dsi_node);
71e4156c5ec43f7 Jitao Shi 2016-11-14 440 of_node_put(dsi_node);
71e4156c5ec43f7 Jitao Shi 2016-11-14 441 if (!host) {
71e4156c5ec43f7 Jitao Shi 2016-11-14 442 ret = -ENODEV;
71e4156c5ec43f7 Jitao Shi 2016-11-14 443 goto err;
71e4156c5ec43f7 Jitao Shi 2016-11-14 444 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 445 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 446
71e4156c5ec43f7 Jitao Shi 2016-11-14 447 dsi = mipi_dsi_device_register_full(host, &info);
71e4156c5ec43f7 Jitao Shi 2016-11-14 448 if (IS_ERR(dsi)) {
71e4156c5ec43f7 Jitao Shi 2016-11-14 449 dev_err(dev, "failed to create dsi device\n");
71e4156c5ec43f7 Jitao Shi 2016-11-14 450 ret = PTR_ERR(dsi);
71e4156c5ec43f7 Jitao Shi 2016-11-14 451 goto err;
71e4156c5ec43f7 Jitao Shi 2016-11-14 452 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 453
71e4156c5ec43f7 Jitao Shi 2016-11-14 454 ps_bridge->dsi = dsi;
71e4156c5ec43f7 Jitao Shi 2016-11-14 455
71e4156c5ec43f7 Jitao Shi 2016-11-14 456 dsi->host = host;
71e4156c5ec43f7 Jitao Shi 2016-11-14 457 dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
71e4156c5ec43f7 Jitao Shi 2016-11-14 458 MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
71e4156c5ec43f7 Jitao Shi 2016-11-14 459 dsi->format = MIPI_DSI_FMT_RGB888;
71e4156c5ec43f7 Jitao Shi 2016-11-14 460 dsi->lanes = 4;
71e4156c5ec43f7 Jitao Shi 2016-11-14 461 ret = mipi_dsi_attach(dsi);
71e4156c5ec43f7 Jitao Shi 2016-11-14 462 if (ret)
71e4156c5ec43f7 Jitao Shi 2016-11-14 463 goto err_dsi_attach;
71e4156c5ec43f7 Jitao Shi 2016-11-14 464
71e4156c5ec43f7 Jitao Shi 2016-11-14 465 return 0;
71e4156c5ec43f7 Jitao Shi 2016-11-14 466
71e4156c5ec43f7 Jitao Shi 2016-11-14 467 err_dsi_attach:
71e4156c5ec43f7 Jitao Shi 2016-11-14 468 mipi_dsi_device_unregister(dsi);
71e4156c5ec43f7 Jitao Shi 2016-11-14 469 err:
71e4156c5ec43f7 Jitao Shi 2016-11-14 470 if (ps_bridge->panel)
71e4156c5ec43f7 Jitao Shi 2016-11-14 471 drm_panel_detach(ps_bridge->panel);
71e4156c5ec43f7 Jitao Shi 2016-11-14 472 drm_connector_cleanup(&ps_bridge->connector);
71e4156c5ec43f7 Jitao Shi 2016-11-14 473 return ret;
71e4156c5ec43f7 Jitao Shi 2016-11-14 474 }
71e4156c5ec43f7 Jitao Shi 2016-11-14 475

:::::: The code at line 399 was first introduced by commit
:::::: 71e4156c5ec43f72077bb1f50882f588cfd71d71 FROMLIST: drm/bridge: Add I2C based driver for ps8640 bridge

:::::: TO: Jitao Shi <jitao.shi@xxxxxxxxxxxx>
:::::: CC: Commit Bot <commit-bot@xxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp