[PATCH v5 15/16] media: platform: Add mali-c55 parameters video node
kernel test robot
lkp at intel.com
Thu May 30 00:18:48 PDT 2024
Hi Daniel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on media-tree/master]
[cannot apply to linuxtv-media-stage/master sailus-media-tree/master linus/master sailus-media-tree/streams v6.10-rc1 next-20240529]
[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/Daniel-Scally/media-uapi-Add-MEDIA_BUS_FMT_RGB202020_1X60-format-code/20240529-233239
base: git://linuxtv.org/media_tree.git master
patch link: https://lore.kernel.org/r/20240529152858.183799-16-dan.scally%40ideasonboard.com
patch subject: [PATCH v5 15/16] media: platform: Add mali-c55 parameters video node
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240530/202405301558.no1nWGU1-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project bafda89a0944d947fc4b3b5663185e07a397ac30)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240530/202405301558.no1nWGU1-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405301558.no1nWGU1-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/media/platform/arm/mali-c55/mali-c55-params.c:14:
In file included from include/media/videobuf2-core.h:18:
In file included from include/linux/dma-buf.h:16:
In file included from include/linux/iosys-map.h:10:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/media/platform/arm/mali-c55/mali-c55-params.c:14:
In file included from include/media/videobuf2-core.h:18:
In file included from include/linux/dma-buf.h:16:
In file included from include/linux/iosys-map.h:10:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/media/platform/arm/mali-c55/mali-c55-params.c:14:
In file included from include/media/videobuf2-core.h:18:
In file included from include/linux/dma-buf.h:16:
In file included from include/linux/iosys-map.h:10:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/media/platform/arm/mali-c55/mali-c55-params.c:14:
In file included from include/media/videobuf2-core.h:18:
In file included from include/linux/dma-buf.h:19:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/media/platform/arm/mali-c55/mali-c55-params.c:505:4: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
504 | dev_dbg(mali_c55->dev, "Invalid parameters buffer size %lu\n",
| ~~~
| %zu
505 | config->total_size);
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:39: note: expanded from macro 'dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:274:19: note: expanded from macro 'dynamic_dev_dbg'
274 | dev, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:59: note: expanded from macro '_dynamic_func_call'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:248:65: note: expanded from macro '_dynamic_func_call_cls'
248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:224:15: note: expanded from macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
8 warnings generated.
vim +505 drivers/media/platform/arm/mali-c55/mali-c55-params.c
480
481 void mali_c55_params_write_config(struct mali_c55 *mali_c55)
482 {
483 struct mali_c55_params *params = &mali_c55->params;
484 enum vb2_buffer_state state = VB2_BUF_STATE_DONE;
485 struct mali_c55_params_buffer *config;
486 struct mali_c55_buffer *buf;
487 size_t block_offset = 0;
488
489 spin_lock(¶ms->buffers.lock);
490
491 buf = list_first_entry_or_null(¶ms->buffers.queue,
492 struct mali_c55_buffer, queue);
493 if (buf)
494 list_del(&buf->queue);
495 spin_unlock(¶ms->buffers.lock);
496
497 if (!buf)
498 return;
499
500 buf->vb.sequence = mali_c55->isp.frame_sequence;
501 config = vb2_plane_vaddr(&buf->vb.vb2_buf, 0);
502
503 if (config->total_size > MALI_C55_PARAMS_MAX_SIZE) {
504 dev_dbg(mali_c55->dev, "Invalid parameters buffer size %lu\n",
> 505 config->total_size);
506 state = VB2_BUF_STATE_ERROR;
507 goto err_buffer_done;
508 }
509
510 /* Walk the list of parameter blocks and process them. */
511 while (block_offset < config->total_size) {
512 const struct mali_c55_block_handler *block_handler;
513 struct mali_c55_params_block_header *block;
514
515 block = (struct mali_c55_params_block_header *)
516 &config->data[block_offset];
517
518 if (block->type >= MALI_C55_PARAM_BLOCK_SENTINEL) {
519 dev_dbg(mali_c55->dev, "Invalid parameters block type\n");
520 state = VB2_BUF_STATE_ERROR;
521 goto err_buffer_done;
522 }
523
524 block_handler = &mali_c55_block_handlers[block->type];
525 if (block->size != block_handler->size) {
526 dev_dbg(mali_c55->dev, "Invalid parameters block size\n");
527 state = VB2_BUF_STATE_ERROR;
528 goto err_buffer_done;
529 }
530
531 block_handler->handler(mali_c55, block);
532
533 block_offset += block->size;
534 }
535
536 err_buffer_done:
537 vb2_buffer_done(&buf->vb.vb2_buf, state);
538 }
539
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list