tree:
https://github.com/jimc/linux.git dd-drm-next
head: 713c9b94da96f63ca998790458e91ac311104609
commit: 8ddaf3cb5e140ad3788e5d6046a3da90780db690 [14/16] dyndbg: add print-to-tracefs,
selftest with it - RFC
config: hexagon-randconfig-r045-20211016 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
a49f5386ce6b091da66ea7c3a1d9a588d53becf7)
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/jimc/linux/commit/8ddaf3cb5e140ad3788e5d6046a3da90780d...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 8ddaf3cb5e140ad3788e5d6046a3da90780db690
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> lib/dynamic_debug.c:440:3: error: expected expression
WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
^
include/asm-generic/bug.h:150:29: note: expanded from macro 'WARN_ONCE'
DO_ONCE_LITE_IF(condition, WARN, 1, format)
^
> lib/dynamic_debug.c:716:3: error: expected ')'
return __dynamic_emit_prefix(desc, buf);
^
lib/dynamic_debug.c:714:5: note: to match this '('
if (unlikely((dyndbg_site_is_enabled(desc)) &&
^
> lib/dynamic_debug.c:739:3: error: implicit declaration of
function 'trace_array_printk' [-Werror,-Wimplicit-function-declaration]
trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf, &vaf);
^
lib/dynamic_debug.c:739:3: note: did you mean 'trace_printk'?
include/linux/kernel.h:467:5: note: 'trace_printk' declared here
int trace_printk(const char *fmt, ...)
^
lib/dynamic_debug.c:766:3: error: implicit declaration of function
'trace_array_printk' [-Werror,-Wimplicit-function-declaration]
trace_array_printk(trace_arr, _THIS_IP_, "%s%pV", buf,
&vaf);
^
4 errors generated.
vim +440 lib/dynamic_debug.c
435
436 static int ddebug_validate_flags(struct flag_settings *modifiers)
437 {
438 #if !defined(CONFIG_TRACING)
439 if (dyndbg_site_is_tracing(modifiers)) {
440 WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
441 return -EINVAL;
442 }
443 #endif
444 return 0;
445 }
446 /*
447 * Parse `str' as a flags specification, format [-+=][p]+.
448 * Sets up *maskp and *flagsp to be used when changing the
449 * flags fields of matched _ddebug's. Returns 0 on success
450 * or <0 on error.
451 */
452 static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers)
453 {
454 int op, i;
455
456 switch (*str) {
457 case '+':
458 case '-':
459 case '=':
460 op = *str++;
461 break;
462 default:
463 pr_err("bad flag-op %c, at start of %s\n", *str, str);
464 return -EINVAL;
465 }
466 v3pr_info("op=<%c>\n", op);
467
468 for (; *str ; ++str) {
469 for (i = ARRAY_SIZE(opt_array) - 1; i >= 0; i--) {
470 if (*str == opt_array[i].opt_char) {
471 modifiers->flags |= opt_array[i].flag;
472 break;
473 }
474 }
475 if (i < 0) {
476 pr_err("unknown flag '%c'\n", *str);
477 return -EINVAL;
478 }
479 }
480 v3pr_info("flags=0x%x\n", modifiers->flags);
481
482 /* calculate final flags, mask based upon op */
483 switch (op) {
484 case '=':
485 /* modifiers->flags already set */
486 modifiers->mask = 0;
487 break;
488 case '+':
489 modifiers->mask = ~0U;
490 break;
491 case '-':
492 modifiers->mask = ~modifiers->flags;
493 modifiers->flags = 0;
494 break;
495 }
496 v3pr_info("*flagsp=0x%x *maskp=0x%x\n", modifiers->flags,
modifiers->mask);
497
498 return ddebug_validate_flags(modifiers);
499 }
500
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org