[linux-next:master 10757/11059] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53: warning: address of 'aconnector->mst_port->mst_mgr' will always evaluate to 'true'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6145d80cfc62e3ed8f16ff584d6287e6d88b82b9
commit: 70cca14c2cb134fa578b45bbb7a133d39513cbad [10757/11059] drm/amd/display: Add MST capability to trigger_hotplug interface
config: x86_64-randconfig-a013-20210408 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 56ea2e2fdd691136d5e6631fa0e447173694b82c)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=70cca14c2cb134fa578b45bbb7a133d39513cbad
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 70cca14c2cb134fa578b45bbb7a133d39513cbad
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53: warning: address of 'aconnector->mst_port->mst_mgr' will always evaluate to 'true' [-Wpointer-bool-conversion]
                           if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
                                                  ~~  ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   1 warning generated.


vim +3015 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c

  2981	
  2982	/*
  2983	 * Sets trigger hpd for MST topologies.
  2984	 * All connected connectors will be rediscovered and re started as needed if val of 1 is sent.
  2985	 * All topologies will be disconnected if val of 0 is set .
  2986	 * Usage to enable topologies: echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst
  2987	 * Usage to disable topologies: echo 0 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst
  2988	 */
  2989	static int trigger_hpd_mst_set(void *data, u64 val)
  2990	{
  2991		struct amdgpu_device *adev = data;
  2992		struct drm_device *dev = adev_to_drm(adev);
  2993		struct drm_connector_list_iter iter;
  2994		struct amdgpu_dm_connector *aconnector;
  2995		struct drm_connector *connector;
  2996		struct dc_link *link = NULL;
  2997	
  2998		if (val == 1) {
  2999			drm_connector_list_iter_begin(dev, &iter);
  3000			drm_for_each_connector_iter(connector, &iter) {
  3001				aconnector = to_amdgpu_dm_connector(connector);
  3002				if (aconnector->dc_link->type == dc_connection_mst_branch &&
  3003				    aconnector->mst_mgr.aux) {
  3004					dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
  3005					drm_dp_mst_topology_mgr_set_mst(&aconnector->mst_mgr, true);
  3006				}
  3007			}
  3008		} else if (val == 0) {
  3009			drm_connector_list_iter_begin(dev, &iter);
  3010			drm_for_each_connector_iter(connector, &iter) {
  3011				aconnector = to_amdgpu_dm_connector(connector);
  3012				if (!aconnector->dc_link)
  3013					continue;
  3014	
> 3015				if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
  3016					continue;
  3017	
  3018				link = aconnector->dc_link;
  3019				dp_receiver_power_ctrl(link, false);
  3020				drm_dp_mst_topology_mgr_set_mst(&aconnector->mst_port->mst_mgr, false);
  3021				link->mst_stream_alloc_table.stream_count = 0;
  3022				memset(link->mst_stream_alloc_table.stream_allocations, 0,
  3023						sizeof(link->mst_stream_alloc_table.stream_allocations));
  3024			}
  3025		} else {
  3026			return 0;
  3027		}
  3028		drm_kms_helper_hotplug_event(dev);
  3029	
  3030		return 0;
  3031	}
  3032	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux