[linux-next:master 11802/12015] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: error: format specifies type 'long' but the argument has type 'unsigned int'

[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:   7800ca95d0ed11b492962dc3abc2181c9d5f7f82
commit: 670e71ded7495930883f17a604b1f3ad90bf1d2f [11802/12015] Merge remote-tracking branch 'amdgpu/drm-next'
config: i386-randconfig-a013-20210906 (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=670e71ded7495930883f17a604b1f3ad90bf1d2f
        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 670e71ded7495930883f17a604b1f3ad90bf1d2f
        # 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 <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:34:
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67:
   drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable]
                   uint64_t temp;
                            ^
   drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: error: no previous prototype for function 'dmub_aux_setconfig_callback' [-Werror,-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: error: no previous prototype for function 'dmub_hpd_callback' [-Werror,-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: error: no previous prototype for function 'register_dmub_notify_callback' [-Werror,-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 
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: error: format specifies type 'long' but the argument has type 'unsigned int' [-Werror,-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))
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 errors generated.


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

e27c41d5b0681c Jude Shih   2021-07-25  732  
e25515e22bdc7c Anson Jacob 2021-07-19  733  #define DMUB_TRACE_MAX_READ 64
81927e2808be5a Jude Shih   2021-04-20  734  /**
81927e2808be5a Jude Shih   2021-04-20  735   * dm_dmub_outbox1_low_irq() - Handles Outbox interrupt
81927e2808be5a Jude Shih   2021-04-20  736   * @interrupt_params: used for determining the Outbox instance
81927e2808be5a Jude Shih   2021-04-20  737   *
81927e2808be5a Jude Shih   2021-04-20  738   * Handles the Outbox Interrupt
81927e2808be5a Jude Shih   2021-04-20  739   * event handler.
81927e2808be5a Jude Shih   2021-04-20  740   */
81927e2808be5a Jude Shih   2021-04-20  741  static void dm_dmub_outbox1_low_irq(void *interrupt_params)
81927e2808be5a Jude Shih   2021-04-20  742  {
81927e2808be5a Jude Shih   2021-04-20  743  	struct dmub_notification notify;
81927e2808be5a Jude Shih   2021-04-20  744  	struct common_irq_params *irq_params = interrupt_params;
81927e2808be5a Jude Shih   2021-04-20  745  	struct amdgpu_device *adev = irq_params->adev;
81927e2808be5a Jude Shih   2021-04-20  746  	struct amdgpu_display_manager *dm = &adev->dm;
81927e2808be5a Jude Shih   2021-04-20  747  	struct dmcub_trace_buf_entry entry = { 0 };
81927e2808be5a Jude Shih   2021-04-20  748  	uint32_t count = 0;
e27c41d5b0681c Jude Shih   2021-07-25  749  	struct dmub_hpd_work *dmub_hpd_wrk;
81927e2808be5a Jude Shih   2021-04-20  750  
81927e2808be5a Jude Shih   2021-04-20  751  	if (dc_enable_dmub_notifications(adev->dm.dc)) {
e27c41d5b0681c Jude Shih   2021-07-25  752  		dmub_hpd_wrk = kzalloc(sizeof(*dmub_hpd_wrk), GFP_ATOMIC);
e27c41d5b0681c Jude Shih   2021-07-25  753  		if (!dmub_hpd_wrk) {
e27c41d5b0681c Jude Shih   2021-07-25  754  			DRM_ERROR("Failed to allocate dmub_hpd_wrk");
e27c41d5b0681c Jude Shih   2021-07-25  755  			return;
e27c41d5b0681c Jude Shih   2021-07-25  756  		}
e27c41d5b0681c Jude Shih   2021-07-25  757  		INIT_WORK(&dmub_hpd_wrk->handle_hpd_work, dm_handle_hpd_work);
e27c41d5b0681c Jude Shih   2021-07-25  758  
81927e2808be5a Jude Shih   2021-04-20  759  		if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) {
81927e2808be5a Jude Shih   2021-04-20  760  			do {
81927e2808be5a Jude Shih   2021-04-20  761  				dc_stat_get_dmub_notification(adev->dm.dc, &notify);
e27c41d5b0681c Jude Shih   2021-07-25  762  				if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
e27c41d5b0681c Jude Shih   2021-07-25  763  					DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
e27c41d5b0681c Jude Shih   2021-07-25 @764  					ARRAY_SIZE(dm->dmub_thread_offload));
e27c41d5b0681c Jude Shih   2021-07-25  765  					continue;
e27c41d5b0681c Jude Shih   2021-07-25  766  				}
e27c41d5b0681c Jude Shih   2021-07-25  767  				if (dm->dmub_thread_offload[notify.type] == true) {
e27c41d5b0681c Jude Shih   2021-07-25  768  					dmub_hpd_wrk->dmub_notify = &notify;
e27c41d5b0681c Jude Shih   2021-07-25  769  					dmub_hpd_wrk->adev = adev;
e27c41d5b0681c Jude Shih   2021-07-25  770  					queue_work(adev->dm.delayed_hpd_wq, &dmub_hpd_wrk->handle_hpd_work);
e27c41d5b0681c Jude Shih   2021-07-25  771  				} else {
e27c41d5b0681c Jude Shih   2021-07-25  772  					dm->dmub_callback[notify.type](adev, &notify);
e27c41d5b0681c Jude Shih   2021-07-25  773  				}
81927e2808be5a Jude Shih   2021-04-20  774  
e27c41d5b0681c Jude Shih   2021-07-25  775  			} while (notify.pending_notification);
81927e2808be5a Jude Shih   2021-04-20  776  
81927e2808be5a Jude Shih   2021-04-20  777  		} else {
81927e2808be5a Jude Shih   2021-04-20  778  			DRM_ERROR("DM: Failed to receive correct outbox IRQ !");
81927e2808be5a Jude Shih   2021-04-20  779  		}
81927e2808be5a Jude Shih   2021-04-20  780  	}
81927e2808be5a Jude Shih   2021-04-20  781  
81927e2808be5a Jude Shih   2021-04-20  782  
81927e2808be5a Jude Shih   2021-04-20  783  	do {
81927e2808be5a Jude Shih   2021-04-20  784  		if (dc_dmub_srv_get_dmub_outbox0_msg(dm->dc, &entry)) {
81927e2808be5a Jude Shih   2021-04-20  785  			trace_amdgpu_dmub_trace_high_irq(entry.trace_code, entry.tick_count,
81927e2808be5a Jude Shih   2021-04-20  786  							entry.param0, entry.param1);
81927e2808be5a Jude Shih   2021-04-20  787  
81927e2808be5a Jude Shih   2021-04-20  788  			DRM_DEBUG_DRIVER("trace_code:%u, tick_count:%u, param0:%u, param1:%u\n",
81927e2808be5a Jude Shih   2021-04-20  789  				 entry.trace_code, entry.tick_count, entry.param0, entry.param1);
81927e2808be5a Jude Shih   2021-04-20  790  		} else
81927e2808be5a Jude Shih   2021-04-20  791  			break;
81927e2808be5a Jude Shih   2021-04-20  792  
81927e2808be5a Jude Shih   2021-04-20  793  		count++;
81927e2808be5a Jude Shih   2021-04-20  794  
81927e2808be5a Jude Shih   2021-04-20  795  	} while (count <= DMUB_TRACE_MAX_READ);
81927e2808be5a Jude Shih   2021-04-20  796  
81927e2808be5a Jude Shih   2021-04-20  797  	ASSERT(count <= DMUB_TRACE_MAX_READ);
81927e2808be5a Jude Shih   2021-04-20  798  }
86bc221918925a Wayne Lin   2021-03-02  799  #endif
86bc221918925a Wayne Lin   2021-03-02  800  

:::::: The code at line 764 was first introduced by commit
:::::: e27c41d5b0681c597ac1894f4e02cf626e062250 drm/amd/display: Support for DMUB HPD interrupt handling

:::::: TO: Jude Shih <shenshih@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

---
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