lkml.org 
[lkml]   [2021]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 27/30] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
    Hi,

    I love your patch! Perhaps something to improve:

    [auto build test WARNING on linuxtv-media/master]
    [also build test WARNING on staging/staging-testing driver-core/driver-core-testing linus/master v5.14-rc6 next-20210818]
    [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]

    url: https://github.com/0day-ci/linux/commits/sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
    base: git://linuxtv.org/media_tree.git master
    config: m68k-allmodconfig (attached as .config)
    compiler: m68k-linux-gcc (GCC) 11.2.0
    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://github.com/0day-ci/linux/commit/f42ae4f45639a6214f9e775d4280061bf52fc229
    git remote add linux-review https://github.com/0day-ci/linux
    git fetch --no-tags linux-review sidraya-bj-pathpartnertech-com/TI-Video-Decoder-driver-upstreaming-to-v5-14-rc6-kernel/20210818-221811
    git checkout f42ae4f45639a6214f9e775d4280061bf52fc229
    # save the attached .config to linux build tree
    COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k

    If you fix the issue, kindly add following tag as appropriate
    Reported-by: kernel test robot <lkp@intel.com>

    All warnings (new ones prefixed by >>):

    In file included from include/linux/printk.h:456,
    from include/linux/kernel.h:19,
    from include/linux/radix-tree.h:12,
    from include/linux/idr.h:15,
    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_alloc':
    >> drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
    290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
    134 | func(&id, ##__VA_ARGS__); \
    | ^~~~~~~~~~~
    include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
    166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
    | ^~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:9: note: in expansion of macro 'dev_dbg'
    290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:290:81: note: format string is defined here
    290 | dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
    | ~~^
    | |
    | unsigned int
    | %lu
    In file included from include/linux/printk.h:456,
    from include/linux/kernel.h:19,
    from include/linux/radix-tree.h:12,
    from include/linux/idr.h:15,
    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function 'img_mem_alloc':
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:25: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
    309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
    134 | func(&id, ##__VA_ARGS__); \
    | ^~~~~~~~~~~
    include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
    166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
    | ^~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:9: note: in expansion of macro 'dev_dbg'
    309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:309:51: note: format string is defined here
    309 | dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
    | ~~^
    | |
    | unsigned int
    | %lu
    In file included from include/linux/printk.h:456,
    from include/linux/kernel.h:19,
    from include/linux/radix-tree.h:12,
    from include/linux/idr.h:15,
    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
    333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
    134 | func(&id, ##__VA_ARGS__); \
    | ^~~~~~~~~~~
    include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
    166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
    | ^~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:9: note: in expansion of macro 'dev_dbg'
    333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
    | ^~~~~~~
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:333:74: note: format string is defined here
    333 | dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
    | ~~^
    | |
    | unsigned int
    | %lu
    In file included from include/linux/printk.h:456,
    from include/linux/kernel.h:19,
    from include/linux/radix-tree.h:12,
    from include/linux/idr.h:15,
    from drivers/staging/media/vxd/decoder/../common/img_mem_man.c:15:
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c: In function '_img_mem_import':
    drivers/staging/media/vxd/decoder/../common/img_mem_man.c:372:25: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'long unsigned int' [-Wformat=]
    372 | dev_dbg(device, "%s ctx %p created buffer %d (%p) actual_size %zu\n",
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
    134 | func(&id, ##__VA_ARGS__); \
    | ^~~~~~~~~~~
    include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
    166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
    | ^~~~~~~~~~~~~~~~~~
    include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
    123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    | ^~~~~~~~~~~~~~~
    --
    drivers/staging/media/vxd/decoder/../common/work_queue.c: In function 'get_delayed_work_buff':
    >> drivers/staging/media/vxd/decoder/../common/work_queue.c:148:22: warning: variable 'previous' set but not used [-Wunused-but-set-variable]
    148 | struct node *previous = NULL;
    | ^~~~~~~~
    --
    >> drivers/staging/media/vxd/decoder/jpeg_secure_parser.c:596:5: warning: no previous prototype for 'bspp_jpeg_unit_parser' [-Wmissing-prototypes]
    596 | int bspp_jpeg_unit_parser(void *swsr_ctx, struct bspp_unit_data *unit_data)
    | ^~~~~~~~~~~~~~~~~~~~~


    vim +290 drivers/staging/media/vxd/decoder/../common/img_mem_man.c

    76b88427fbba69 Sidraya 2021-08-18 240
    76b88427fbba69 Sidraya 2021-08-18 241 static int _img_mem_alloc(void *device, struct mem_ctx *ctx,
    76b88427fbba69 Sidraya 2021-08-18 242 struct heap *heap, unsigned long size,
    76b88427fbba69 Sidraya 2021-08-18 243 enum mem_attr attr, struct buffer **buffer_new)
    76b88427fbba69 Sidraya 2021-08-18 244 {
    76b88427fbba69 Sidraya 2021-08-18 245 struct buffer *buffer;
    76b88427fbba69 Sidraya 2021-08-18 246 int ret;
    76b88427fbba69 Sidraya 2021-08-18 247
    76b88427fbba69 Sidraya 2021-08-18 248 if (size == 0) {
    76b88427fbba69 Sidraya 2021-08-18 249 dev_err(device, "%s: buffer size is zero\n", __func__);
    76b88427fbba69 Sidraya 2021-08-18 250 return -EINVAL;
    76b88427fbba69 Sidraya 2021-08-18 251 }
    76b88427fbba69 Sidraya 2021-08-18 252
    76b88427fbba69 Sidraya 2021-08-18 253 if (!heap->ops || !heap->ops->alloc) {
    76b88427fbba69 Sidraya 2021-08-18 254 dev_err(device, "%s: no alloc function in heap %d!\n",
    76b88427fbba69 Sidraya 2021-08-18 255 __func__, heap->id);
    76b88427fbba69 Sidraya 2021-08-18 256 return -EINVAL;
    76b88427fbba69 Sidraya 2021-08-18 257 }
    76b88427fbba69 Sidraya 2021-08-18 258
    76b88427fbba69 Sidraya 2021-08-18 259 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
    76b88427fbba69 Sidraya 2021-08-18 260 if (!buffer)
    76b88427fbba69 Sidraya 2021-08-18 261 return -ENOMEM;
    76b88427fbba69 Sidraya 2021-08-18 262
    76b88427fbba69 Sidraya 2021-08-18 263 ret = idr_alloc(ctx->buffers, buffer,
    76b88427fbba69 Sidraya 2021-08-18 264 MEM_MAN_MIN_BUFFER, MEM_MAN_MAX_BUFFER, GFP_KERNEL);
    76b88427fbba69 Sidraya 2021-08-18 265 if (ret < 0) {
    76b88427fbba69 Sidraya 2021-08-18 266 dev_err(device, "%s: idr_alloc failed\n", __func__);
    76b88427fbba69 Sidraya 2021-08-18 267 goto idr_alloc_failed;
    76b88427fbba69 Sidraya 2021-08-18 268 }
    76b88427fbba69 Sidraya 2021-08-18 269
    76b88427fbba69 Sidraya 2021-08-18 270 buffer->id = ret;
    76b88427fbba69 Sidraya 2021-08-18 271 buffer->request_size = size;
    76b88427fbba69 Sidraya 2021-08-18 272 buffer->actual_size = ((size + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
    76b88427fbba69 Sidraya 2021-08-18 273 buffer->device = device;
    76b88427fbba69 Sidraya 2021-08-18 274 buffer->mem_ctx = ctx;
    76b88427fbba69 Sidraya 2021-08-18 275 buffer->heap = heap;
    76b88427fbba69 Sidraya 2021-08-18 276 INIT_LIST_HEAD(&buffer->mappings);
    76b88427fbba69 Sidraya 2021-08-18 277 buffer->kptr = NULL;
    76b88427fbba69 Sidraya 2021-08-18 278 buffer->priv = NULL;
    76b88427fbba69 Sidraya 2021-08-18 279
    76b88427fbba69 Sidraya 2021-08-18 280 ret = heap->ops->alloc(device, heap, buffer->actual_size, attr,
    76b88427fbba69 Sidraya 2021-08-18 281 buffer);
    76b88427fbba69 Sidraya 2021-08-18 282 if (ret) {
    76b88427fbba69 Sidraya 2021-08-18 283 dev_err(device, "%s: heap %d alloc failed\n", __func__,
    76b88427fbba69 Sidraya 2021-08-18 284 heap->id);
    76b88427fbba69 Sidraya 2021-08-18 285 goto heap_alloc_failed;
    76b88427fbba69 Sidraya 2021-08-18 286 }
    76b88427fbba69 Sidraya 2021-08-18 287
    76b88427fbba69 Sidraya 2021-08-18 288 *buffer_new = buffer;
    76b88427fbba69 Sidraya 2021-08-18 289
    76b88427fbba69 Sidraya 2021-08-18 @290 dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
    76b88427fbba69 Sidraya 2021-08-18 291 __func__, heap, ctx, buffer->id, buffer, buffer->actual_size);
    76b88427fbba69 Sidraya 2021-08-18 292 return 0;
    76b88427fbba69 Sidraya 2021-08-18 293
    76b88427fbba69 Sidraya 2021-08-18 294 heap_alloc_failed:
    76b88427fbba69 Sidraya 2021-08-18 295 idr_remove(ctx->buffers, buffer->id);
    76b88427fbba69 Sidraya 2021-08-18 296 idr_alloc_failed:
    76b88427fbba69 Sidraya 2021-08-18 297 kfree(buffer);
    76b88427fbba69 Sidraya 2021-08-18 298 return ret;
    76b88427fbba69 Sidraya 2021-08-18 299 }
    76b88427fbba69 Sidraya 2021-08-18 300

    ---
    0-DAY CI Kernel Test Service, Intel Corporation
    https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
    [unhandled content-type:application/gzip]
    \
     
     \ /
      Last update: 2021-08-18 20:25    [W:5.494 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site