tree:
https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 15890c07a0b56cea8221557f4c28a2052c1b3d14
commit: 784b157f3c0a73f43f395ab88d8780eaafff6b8e [48/69] v4l: vsp1: Add debugfs system
v1.8
config: arc-randconfig-r012-20210518 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar
https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 784b157f3c0a73f43f395ab88d8780eaafff6b8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_info':
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: error: 'VI6_WPF0_FRCNT'
undeclared (first use in this function)
371 | seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x", vsp1_read(vsp1,
VI6_WPF0_FRCNT));
| ^~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: note: each undeclared identifier is
reported only once for each function it appears in
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_init':
> drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning:
variable 'info_file' set but not used [-Wunused-but-set-variable]
471 |
struct dentry *info_file;
| ^~~~~~~~~
At top level:
drivers/media/platform/vsp1/vsp1_debugfs.c:311:13: warning:
'vsp1_reg_read_and_decode' defined but not used [-Wunused-function]
311 | static void vsp1_reg_read_and_decode(struct vsp1_device *vsp1,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:281:12: warning: 'vsp1_reg_decode'
defined but not used [-Wunused-function]
281 | static int vsp1_reg_decode(struct seq_file *s, u32 offset, u32 value)
| ^~~~~~~~~~~~~~~
vim +/info_file +471 drivers/media/platform/vsp1/vsp1_debugfs.c
354
355 static int vsp1_debugfs_info(struct seq_file *s, void *p)
356 {
357 struct vsp1_device *vsp1 = s->private;
358 unsigned int i;
359 u32 status;
360
361 /* Make sure all reads are with 'powered' device */
362 vsp1_device_get(vsp1);
363
364 seq_printf(s, "name: %s\n", vsp1->info->model ?
vsp1->info->model : "");
365
366 status = vsp1_read(vsp1, VI6_STATUS);
367 seq_printf(s, "VI6_STATUS = 0x%08x : ", status);
368 decode_vi6_status(s, status);
369 seq_puts(s, "\n");
370
371 seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x",
vsp1_read(vsp1, VI6_WPF0_FRCNT));
372
373 for (i = 0; i < vsp1->info->wpf_count; ++i) {
374 struct vsp1_rwpf *wpf = vsp1->wpf[i];
375 u32 status;
376 u32 enable;
377
378 if (wpf == NULL)
379 continue;
380
381 enable = vsp1_read(vsp1, VI6_WPF_IRQ_ENB(i));
382 status = vsp1_read(vsp1, VI6_WPF_IRQ_STA(i));
383
384 seq_printf(s, "VI6_WPF_IRQ_ENB(%d) = ", i);
385 decode_vi6_wpf_enb(s, enable);
386 seq_puts(s, "\n");
387
388 seq_printf(s, "VI6_WPF_IRQ_STA(%d) = ", i);
389 decode_vi6_wpf_sta(s, status);
390 seq_puts(s, "\n");
391
392 seq_printf(s, "WPF[%d]->entity->Pipe = %p\n", i,
wpf->entity.pipe);
393 /* Report the WPF Pipe information */
394 vsp1_debugfs_print_vsp1_pipe(s, wpf->entity.pipe, "WPF");
395
396 status = vsp1_read(vsp1, VI6_DISP_IRQ_STA(i));
397 seq_printf(s, "VI6_DISP_IRQ_STA(%d) = ", i);
398 decode_vi6_disp_irq_sta(s, status);
399 seq_puts(s, "\n");
400 }
401
402 for (i = 0; i < vsp1->info->rpf_count; ++i) {
403 struct vsp1_rwpf *rpf = vsp1->rpf[i];
404
405 if (rpf == NULL)
406 continue;
407
408 seq_printf(s,
409 "RPF[%d]->entity.pipe = %p\n", i, rpf->entity.pipe);
410
411 vsp1_debugfs_print_vsp1_pipe(s, rpf->entity.pipe, "RPF");
412
413 }
414
415 vsp1_device_put(vsp1);
416
417 return 0;
418 }
419 DEBUGFS_RO_ATTR(vsp1_debugfs_info);
420
421 static int vsp1_debugfs_regs(struct seq_file *s, void *p)
422 {
423 struct vsp1_device *vsp1 = s->private;
424 unsigned int i;
425 u32 status;
426
427 /* Make sure all reads are with 'powered' device */
428 vsp1_device_get(vsp1);
429
430 for (i = 0; i < ARRAY_SIZE(vsp1_regset); i++) {
431 const struct debugfs_reg32 *reg = &vsp1_regset[i];
432
433 status = vsp1_read(vsp1, reg->offset);
434
435 seq_printf(s, "0x%08x [%s]\n", status, reg->name);
436 }
437
438 vsp1_device_put(vsp1);
439
440 return 0;
441 }
442 DEBUGFS_RO_ATTR(vsp1_debugfs_regs);
443
444 static int vsp1_debugfs_reset_wpf(struct seq_file *s, void *p)
445 {
446 struct vsp1_device *vsp1 = s->private;
447 int ret;
448
449 /* Make sure all reads are with 'powered' device */
450 vsp1_device_get(vsp1);
451
452 /* Prints are 'before' and 'after' to preserve timing on output
*/
453 seq_puts(s, "Resetting WPF[0] : ");
454
455 ret = vsp1_reset_wpf(vsp1->wpf[0]->entity.vsp1,
456 vsp1->wpf[0]->entity.index);
457 if (ret == 0)
458 seq_puts(s, "Success\n");
459 else
460 seq_puts(s, "Failed\n");
461
462 vsp1_device_put(vsp1);
463
464 return 0;
465 }
466 DEBUGFS_RO_ATTR(vsp1_debugfs_reset_wpf);
467
468 /* Debugfs initialised after entities are created */
469 int vsp1_debugfs_init(struct vsp1_device *vsp1)
470 {
471 struct dentry *info_file;
472
473 vsp1->regset.regs = vsp1_regset;
474 vsp1->regset.base = vsp1->mmio;
475 vsp1->regset.nregs = ARRAY_SIZE(vsp1_regset);
476
477 vsp1->dbgroot = debugfs_create_dir(dev_name(vsp1->dev), NULL);
478 if (!vsp1->dbgroot)
479 return -ENOMEM;
480
481 /* dentry pointer discarded */
482 info_file = debugfs_create_file("info", 0444,
483 vsp1->dbgroot,
484 vsp1,
485 &vsp1_debugfs_info_fops);
486
487 /* dentry pointer discarded */
488 info_file = debugfs_create_file("regs_local", 0444,
489 vsp1->dbgroot,
490 vsp1,
491 &vsp1_debugfs_regs_fops);
492
493 /* dentry pointer discarded */
494 info_file = debugfs_create_file("reset_wpf0", 0444,
495 vsp1->dbgroot,
496 vsp1,
497 &vsp1_debugfs_reset_wpf_fops);
498
499 debugfs_create_regset32("regs", 0444, vsp1->dbgroot,
&vsp1->regset);
500
501 return 0;
502 }
503
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org