lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208101710.k7almVm5-lkp@intel.com>
Date:   Wed, 10 Aug 2022 17:22:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jude Shih <shenshih@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nicholas Kazlauskas <Nicholas.Kazlauskas@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Sasha Levin <sashal@...nel.org>
Subject: [linux-stable-rc:linux-5.15.y 8765/9027]
 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: warning:
 no previous prototype for 'dmub_aux_setconfig_callback'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
head:   9c5eacc2ad1f605c31c69d9e2436823ada99f1dc
commit: 734d5ce02cb069cccedc993d8f1dc0ea41cfa3dd [8765/9027] drm/amd/display: Support for DMUB HPD interrupt handling
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220810/202208101710.k7almVm5-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=734d5ce02cb069cccedc993d8f1dc0ea41cfa3dd
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.15.y
        git checkout 734d5ce02cb069cccedc993d8f1dc0ea41cfa3dd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: warning: no previous prototype for 'dmub_aux_setconfig_callback' [-Wmissing-prototypes]
     632 | void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:6: warning: no previous prototype for 'dmub_hpd_callback' [-Wmissing-prototypes]
     648 | void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
         |      ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:6: warning: no previous prototype for 'register_dmub_notify_callback' [-Wmissing-prototypes]
     702 | bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:37,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29,
                    from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:29:
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_dmub_outbox1_low_irq':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:763:51: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=]
     763 |                                         DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
         |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_print.h:498:19: note: in definition of macro 'DRM_ERROR'
     498 |         __drm_err(fmt, ##__VA_ARGS__)
         |                   ^~~
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:763:100: note: format string is defined here
     763 |                                         DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
         |                                                                                                  ~~^
         |                                                                                                    |
         |                                                                                                    long int
         |                                                                                                  %d
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_update_mst_vcpi_slots_for_dsc':
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7014:19: warning: variable 'clock' set but not used [-Wunused-but-set-variable]
    7014 |         int i, j, clock;
         |                   ^~~~~
--
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:633: warning: expecting prototype for dmub_aux_setconfig_reply_callback(). Prototype was for dmub_aux_setconfig_callback() instead


vim +/dmub_aux_setconfig_callback +632 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c

   622	
   623	/**
   624	 * dmub_aux_setconfig_reply_callback - Callback for AUX or SET_CONFIG command.
   625	 * @adev: amdgpu_device pointer
   626	 * @notify: dmub notification structure
   627	 *
   628	 * Dmub AUX or SET_CONFIG command completion processing callback
   629	 * Copies dmub notification to DM which is to be read by AUX command.
   630	 * issuing thread and also signals the event to wake up the thread.
   631	 */
 > 632	void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
 > 633	{
   634		if (adev->dm.dmub_notify)
   635			memcpy(adev->dm.dmub_notify, notify, sizeof(struct dmub_notification));
   636		if (notify->type == DMUB_NOTIFICATION_AUX_REPLY)
   637			complete(&adev->dm.dmub_aux_transfer_done);
   638	}
   639	
   640	/**
   641	 * dmub_hpd_callback - DMUB HPD interrupt processing callback.
   642	 * @adev: amdgpu_device pointer
   643	 * @notify: dmub notification structure
   644	 *
   645	 * Dmub Hpd interrupt processing callback. Gets displayindex through the
   646	 * ink index and calls helper to do the processing.
   647	 */
 > 648	void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
   649	{
   650		struct amdgpu_dm_connector *aconnector;
   651		struct drm_connector *connector;
   652		struct drm_connector_list_iter iter;
   653		struct dc_link *link;
   654		uint8_t link_index = 0;
   655		struct drm_device *dev = adev->dm.ddev;
   656	
   657		if (adev == NULL)
   658			return;
   659	
   660		if (notify == NULL) {
   661			DRM_ERROR("DMUB HPD callback notification was NULL");
   662			return;
   663		}
   664	
   665		if (notify->link_index > adev->dm.dc->link_count) {
   666			DRM_ERROR("DMUB HPD index (%u)is abnormal", notify->link_index);
   667			return;
   668		}
   669	
   670		drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
   671	
   672		link_index = notify->link_index;
   673	
   674		link = adev->dm.dc->links[link_index];
   675	
   676		drm_connector_list_iter_begin(dev, &iter);
   677		drm_for_each_connector_iter(connector, &iter) {
   678			aconnector = to_amdgpu_dm_connector(connector);
   679			if (link && aconnector->dc_link == link) {
   680				DRM_INFO("DMUB HPD callback: link_index=%u\n", link_index);
   681				handle_hpd_irq_helper(aconnector);
   682				break;
   683			}
   684		}
   685		drm_connector_list_iter_end(&iter);
   686		drm_modeset_unlock(&dev->mode_config.connection_mutex);
   687	
   688	}
   689	
   690	/**
   691	 * register_dmub_notify_callback - Sets callback for DMUB notify
   692	 * @adev: amdgpu_device pointer
   693	 * @type: Type of dmub notification
   694	 * @callback: Dmub interrupt callback function
   695	 * @dmub_int_thread_offload: offload indicator
   696	 *
   697	 * API to register a dmub callback handler for a dmub notification
   698	 * Also sets indicator whether callback processing to be offloaded.
   699	 * to dmub interrupt handling thread
   700	 * Return: true if successfully registered, false if there is existing registration
   701	 */
 > 702	bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
   703	dmub_notify_interrupt_callback_t callback, bool dmub_int_thread_offload)
   704	{
   705		if (callback != NULL && type < ARRAY_SIZE(adev->dm.dmub_thread_offload)) {
   706			adev->dm.dmub_callback[type] = callback;
   707			adev->dm.dmub_thread_offload[type] = dmub_int_thread_offload;
   708		} else
   709			return false;
   710	
   711		return true;
   712	}
   713	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ