[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202502120928.wbtfGrUk-lkp@intel.com>
Date: Wed, 12 Feb 2025 09:31:02 +0800
From: kernel test robot <lkp@...el.com>
To: Nas Chung <nas.chung@...psnmedia.com>, mchehab@...nel.org,
hverkuil@...all.nl, sebastian.fricke@...labora.com, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-imx@....com,
linux-arm-kernel@...ts.infradead.org, jackson.lee@...psnmedia.com,
lafley.kim@...psnmedia.com, Nas Chung <nas.chung@...psnmedia.com>
Subject: Re: [PATCH 7/8] media: chips-media: wave6: Add Wave6 control driver
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: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250212/202502120928.wbtfGrUk-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 6807164500e9920638e2ab0cdb4bf8321d24f8eb)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120928.wbtfGrUk-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502120928.wbtfGrUk-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:384:4: warning: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
383 | dev_err(ctrl->dev, "firmware size (%ld > %zd) is too big\n",
| ~~~
| %zu
384 | fw->size, ctrl->boot_mem.size);
| ^~~~~~~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
>> drivers/media/platform/chips-media/wave6/wave6-vpu-ctrl.c:929:58: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
928 | dev_info(&pdev->dev, "sram 0x%pad, 0x%pad, size 0x%lx\n",
| ~~~
| %zx
929 | &ctrl->sram_buf.phys_addr, &ctrl->sram_buf.dma_addr, ctrl->sram_buf.size);
| ^~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:160:67: note: expanded from macro 'dev_info'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
2 warnings generated.
vim +384 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
Powered by blists - more mailing lists