Re: [PATCHv8 09/13] dw-hdmi: use cec_notifier_conn_(un)register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.2-rc6 next-20190621]
[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/Hans-Verkuil/cec-improve-notifier-support-add-connector-info/20190625-043917
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-x014-201925 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/gpu/drm/bridge/synopsys/dw-hdmi.c: In function 'dw_hdmi_bridge_attach':
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:2154:30: error: passing argument 1 of 'cec_fill_conn_info_from_drm' from incompatible pointer type [-Werror=incompatible-pointer-types]
     cec_fill_conn_info_from_drm(&conn_info, connector);
                                 ^
   In file included from include/media/cec-notifier.h:13:0,
                    from drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:36:
   include/media/cec.h:381:1: note: expected 'const struct drm_connector *' but argument is of type 'struct cec_connector_info *'
    cec_fill_conn_info_from_drm(const struct drm_connector *connector,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:2154:42: error: passing argument 2 of 'cec_fill_conn_info_from_drm' from incompatible pointer type [-Werror=incompatible-pointer-types]
     cec_fill_conn_info_from_drm(&conn_info, connector);
                                             ^~~~~~~~~
   In file included from include/media/cec-notifier.h:13:0,
                    from drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:36:
   include/media/cec.h:381:1: note: expected 'struct cec_connector_info *' but argument is of type 'struct drm_connector *'
    cec_fill_conn_info_from_drm(const struct drm_connector *connector,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_irq
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irq
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
   Cyclomatic Complexity 1 include/linux/completion.h:reinit_completion
   Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 1 include/linux/i2c.h:i2c_get_adapdata
   Cyclomatic Complexity 1 include/linux/i2c.h:i2c_set_adapdata
   Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_connector_helper_add
   Cyclomatic Complexity 1 include/media/cec-notifier.h:cec_notifier_conn_register
   Cyclomatic Complexity 1 include/media/cec-notifier.h:cec_notifier_conn_unregister
   Cyclomatic Complexity 1 include/media/cec-notifier.h:cec_notifier_set_phys_addr
   Cyclomatic Complexity 1 include/media/cec-notifier.h:cec_notifier_set_phys_addr_from_edid
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_i2c_func
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_bus_fmt_is_rgb
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_bus_fmt_is_yuv444
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_bus_fmt_is_yuv422
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_bus_fmt_is_yuv420
   Cyclomatic Complexity 5 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_bus_fmt_color_depth
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:is_color_space_conversion
   Cyclomatic Complexity 6 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:is_color_space_decimation
   Cyclomatic Complexity 6 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:is_color_space_interpolation
   Cyclomatic Complexity 35 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_compute_n
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_audio_enable
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_audio_disable
   Cyclomatic Complexity 23 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_support_scdc
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_poweroff
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_update_phy_mask
   Cyclomatic Complexity 7 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_bridge_mode_valid
   Cyclomatic Complexity 4 include/linux/device.h:dev_name
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_modb
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_mask_writeb
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_gen2_pddq
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_gen2_txpwron
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_enable_tmds
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_enable_powerdown
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_sel_data_en_pol
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_sel_interface_control
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_enable_svsret
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_phy_test_clear
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_tx_hdcp_config
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_writeb
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_set_cts_n
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_set_clk_regenerator
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_set_sample_rate
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_clk_regenerator_update_pixel_clock
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_init_clk_regenerator
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_ahb_audio_disable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_ahb_audio_enable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_reset
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_i2c_set_addr
   Cyclomatic Complexity 12 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_update_hpd
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_setup_hpd
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_disable_overflow_interrupts
   Cyclomatic Complexity 5 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_enable_video_path
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_enable_audio_clk
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_i2s_audio_disable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_i2s_audio_enable
   Cyclomatic Complexity 26 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_video_packetize
   Cyclomatic Complexity 14 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_update_csc_coeffs
   Cyclomatic Complexity 9 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_video_csc
   Cyclomatic Complexity 12 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_video_sample
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_cec_disable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_cec_enable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_setup_i2c
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_i2c_init
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_readb
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_phy_wait_i2c_done
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_i2c_write
   Cyclomatic Complexity 24 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_phy_configure_dwc_hdmi_3d_tx
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_phy_read_hpd
   Cyclomatic Complexity 4 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_clear_overflow
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:initialize_hdmi_ih_mutes
   Cyclomatic Complexity 6 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_set_high_tmds_clock_ratio
   Cyclomatic Complexity 1 include/drm/drm_scdc_helper.h:drm_scdc_readb
   Cyclomatic Complexity 1 include/drm/drm_scdc_helper.h:drm_scdc_writeb
   Cyclomatic Complexity 28 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_av_composer
   Cyclomatic Complexity 37 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_config_AVI
   Cyclomatic Complexity 10 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:hdmi_config_vendor_specific_infoframe
   Cyclomatic Complexity 25 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_setup
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:dw_hdmi_poweron

vim +/cec_fill_conn_info_from_drm +2154 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

  2136	
  2137	static int dw_hdmi_bridge_attach(struct drm_bridge *bridge)
  2138	{
  2139		struct dw_hdmi *hdmi = bridge->driver_private;
  2140		struct drm_encoder *encoder = bridge->encoder;
  2141		struct drm_connector *connector = &hdmi->connector;
  2142		struct cec_connector_info conn_info;
  2143	
  2144		connector->interlace_allowed = 1;
  2145		connector->polled = DRM_CONNECTOR_POLL_HPD;
  2146	
  2147		drm_connector_helper_add(connector, &dw_hdmi_connector_helper_funcs);
  2148	
  2149		drm_connector_init(bridge->dev, connector, &dw_hdmi_connector_funcs,
  2150				   DRM_MODE_CONNECTOR_HDMIA);
  2151	
  2152		drm_connector_attach_encoder(connector, encoder);
  2153	
> 2154		cec_fill_conn_info_from_drm(&conn_info, connector);
  2155	
  2156		hdmi->cec_notifier = cec_notifier_conn_register(hdmi->dev, NULL,
  2157								&conn_info);
  2158		if (!hdmi->cec_notifier)
  2159			return -ENOMEM;
  2160	
  2161		if (hdmi->cec_configured) {
  2162			struct platform_device_info pdevinfo;
  2163			struct dw_hdmi_cec_data cec;
  2164	
  2165			memset(&pdevinfo, 0, sizeof(pdevinfo));
  2166			pdevinfo.parent = hdmi->dev;
  2167			pdevinfo.id = PLATFORM_DEVID_AUTO;
  2168	
  2169			cec.hdmi = hdmi;
  2170			cec.ops = &dw_hdmi_cec_ops;
  2171			cec.irq = hdmi->irq;
  2172	
  2173			pdevinfo.name = "dw-hdmi-cec";
  2174			pdevinfo.data = &cec;
  2175			pdevinfo.size_data = sizeof(cec);
  2176			pdevinfo.dma_mask = 0;
  2177	
  2178			hdmi->cec = platform_device_register_full(&pdevinfo);
  2179		}
  2180	
  2181		return 0;
  2182	}
  2183	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux