[linux-next:master 11329/11721] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int'
From: kernel test robot <hidden>
Date: 2021-09-05 00:24:26
Also in:
llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 14c6345e6e6ca0570f3897214f24748ef6009761 commit: e27c41d5b0681c597ac1894f4e02cf626e062250 [11329/11721] drm/amd/display: Support for DMUB HPD interrupt handling config: i386-randconfig-r021-20210904 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739) 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e27c41d5b0681c597ac1894f4e02cf626e062250 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 e27c41d5b0681c597ac1894f4e02cf626e062250 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: warning: no previous prototype for function 'dmub_aux_setconfig_callback' [-Wmissing-prototypes] void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify) ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify) ^ static drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:6: warning: no previous prototype for function 'dmub_hpd_callback' [-Wmissing-prototypes] void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify) ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify) ^ static drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:6: warning: no previous prototype for function 'register_dmub_notify_callback' [-Wmissing-prototypes] bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type, ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type, ^ static
quoted
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int' [-Wformat]
ARRAY_SIZE(dm->dmub_thread_offload));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:498:19: note: expanded from macro 'DRM_ERROR'
__drm_err(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/kernel.h:44:25: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +764 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
732
733 #define DMUB_TRACE_MAX_READ 64
734 /**
735 * dm_dmub_outbox1_low_irq() - Handles Outbox interrupt
736 * @interrupt_params: used for determining the Outbox instance
737 *
738 * Handles the Outbox Interrupt
739 * event handler.
740 */
741 static void dm_dmub_outbox1_low_irq(void *interrupt_params)
742 {
743 struct dmub_notification notify;
744 struct common_irq_params *irq_params = interrupt_params;
745 struct amdgpu_device *adev = irq_params->adev;
746 struct amdgpu_display_manager *dm = &adev->dm;
747 struct dmcub_trace_buf_entry entry = { 0 };
748 uint32_t count = 0;
749 struct dmub_hpd_work *dmub_hpd_wrk;
750
751 if (dc_enable_dmub_notifications(adev->dm.dc)) {
752 dmub_hpd_wrk = kzalloc(sizeof(*dmub_hpd_wrk), GFP_ATOMIC);
753 if (!dmub_hpd_wrk) {
754 DRM_ERROR("Failed to allocate dmub_hpd_wrk");
755 return;
756 }
757 INIT_WORK(&dmub_hpd_wrk->handle_hpd_work, dm_handle_hpd_work);
758
759 if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) {
760 do {
761 dc_stat_get_dmub_notification(adev->dm.dc, ¬ify);
762 if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
763 DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
> 764 ARRAY_SIZE(dm->dmub_thread_offload));
765 continue;
766 }
767 if (dm->dmub_thread_offload[notify.type] == true) {
768 dmub_hpd_wrk->dmub_notify = ¬ify;
769 dmub_hpd_wrk->adev = adev;
770 queue_work(adev->dm.delayed_hpd_wq, &dmub_hpd_wrk->handle_hpd_work);
771 } else {
772 dm->dmub_callback[notify.type](adev, ¬ify);
773 }
774
775 } while (notify.pending_notification);
776
777 } else {
778 DRM_ERROR("DM: Failed to receive correct outbox IRQ !");
779 }
780 }
781
782
783 do {
784 if (dc_dmub_srv_get_dmub_outbox0_msg(dm->dc, &entry)) {
785 trace_amdgpu_dmub_trace_high_irq(entry.trace_code, entry.tick_count,
786 entry.param0, entry.param1);
787
788 DRM_DEBUG_DRIVER("trace_code:%u, tick_count:%u, param0:%u, param1:%u\n",
789 entry.trace_code, entry.tick_count, entry.param0, entry.param1);
790 } else
791 break;
792
793 count++;
794
795 } while (count <= DMUB_TRACE_MAX_READ);
796
797 ASSERT(count <= DMUB_TRACE_MAX_READ);
798 }
799 #endif
800
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 40404 bytes