Re: [PATCH 7/8] media: chips-media: wave6: Add Wave6 control driver

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

 



Hi Nas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linuxtv-media-pending/master]
[also build test WARNING on arm64/for-next/core robh/for-next linus/master v6.14-rc2 next-20250210]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nas-Chung/media-platform-chips-media-wave5-Rename-Kconfig-parameter/20250210-171144
base:   https://git.linuxtv.org/media-ci/media-pending.git master
patch link:    https://lore.kernel.org/r/20250210090725.4580-8-nas.chung%40chipsnmedia.com
patch subject: [PATCH 7/8] media: chips-media: wave6: Add Wave6 control driver
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20250212/202502120449.ZTdCf6WQ-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120449.ZTdCf6WQ-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502120449.ZTdCf6WQ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/platform_device.h:13,
                    from drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:10:
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c: In function 'wave6_vpu_ctrl_load_firmware':
>> drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:383:36: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     383 |                 dev_err(ctrl->dev, "firmware size (%ld > %zd) is too big\n",
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:383:17: note: in expansion of macro 'dev_err'
     383 |                 dev_err(ctrl->dev, "firmware size (%ld > %zd) is too big\n",
         |                 ^~~~~~~
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:383:54: note: format string is defined here
     383 |                 dev_err(ctrl->dev, "firmware size (%ld > %zd) is too big\n",
         |                                                    ~~^
         |                                                      |
         |                                                      long int
         |                                                    %d
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c: In function 'wave6_vpu_ctrl_probe':
>> drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:928:38: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     928 |                 dev_info(&pdev->dev, "sram 0x%pad, 0x%pad, size 0x%lx\n",
         |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
     160 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                          ^~~~~~~
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:928:17: note: in expansion of macro 'dev_info'
     928 |                 dev_info(&pdev->dev, "sram 0x%pad, 0x%pad, size 0x%lx\n",
         |                 ^~~~~~~~
   drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:928:69: note: format string is defined here
     928 |                 dev_info(&pdev->dev, "sram 0x%pad, 0x%pad, size 0x%lx\n",
         |                                                                   ~~^
         |                                                                     |
         |                                                                     long unsigned int
         |                                                                   %x


vim +383 drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c

   357	
   358	static void wave6_vpu_ctrl_load_firmware(const struct firmware *fw, void *context)
   359	{
   360		struct vpu_ctrl *ctrl = context;
   361		struct wave6_vpu_entity *entity = ctrl->current_entity;
   362		u32 product_code;
   363		int ret;
   364	
   365		ret = pm_runtime_resume_and_get(ctrl->dev);
   366		if (ret) {
   367			dev_err(ctrl->dev, "pm runtime resume fail, ret = %d\n", ret);
   368			mutex_lock(&ctrl->ctrl_lock);
   369			wave6_vpu_ctrl_set_state(ctrl, WAVE6_VPU_STATE_OFF);
   370			ctrl->current_entity = NULL;
   371			mutex_unlock(&ctrl->ctrl_lock);
   372			release_firmware(fw);
   373			return;
   374		}
   375	
   376		if (!fw || !fw->data) {
   377			dev_err(ctrl->dev, "No firmware.\n");
   378			ret = -EINVAL;
   379			goto exit;
   380		}
   381	
   382		if (fw->size + WAVE6_EXTRA_CODE_BUF_SIZE > wave6_vpu_ctrl_get_code_buf_size(ctrl)) {
 > 383			dev_err(ctrl->dev, "firmware size (%ld > %zd) is too big\n",
   384				fw->size, ctrl->boot_mem.size);
   385			ret = -EINVAL;
   386			goto exit;
   387		}
   388	
   389		product_code = entity->read_reg(entity->dev, W6_VPU_RET_PRODUCT_VERSION);
   390		if (!PRODUCT_CODE_W_SERIES(product_code)) {
   391			dev_err(ctrl->dev, "unknown product : %08x\n", product_code);
   392			ret = -EINVAL;
   393			goto exit;
   394		}
   395	
   396		memcpy(ctrl->boot_mem.vaddr, fw->data, fw->size);
   397	
   398	exit:
   399		mutex_lock(&ctrl->ctrl_lock);
   400		if (!ret && wave6_vpu_ctrl_find_entity(ctrl, ctrl->current_entity)) {
   401			wave6_vpu_ctrl_remap_code_buffer(ctrl);
   402			ret = wave6_vpu_ctrl_init_vpu(ctrl);
   403		} else {
   404			ret = -EINVAL;
   405		}
   406		mutex_unlock(&ctrl->ctrl_lock);
   407	
   408		pm_runtime_put_sync(ctrl->dev);
   409		release_firmware(fw);
   410	
   411		mutex_lock(&ctrl->ctrl_lock);
   412		ctrl->current_entity = NULL;
   413		if (ret)
   414			wave6_vpu_ctrl_set_state(ctrl, WAVE6_VPU_STATE_OFF);
   415		else
   416			wave6_vpu_ctrl_boot_done(ctrl, 0);
   417		mutex_unlock(&ctrl->ctrl_lock);
   418	
   419		wake_up_interruptible_all(&ctrl->load_fw_wq);
   420	}
   421	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux