tree:
https://github.com/jimc/linux.git dd-drm-next
head: 599fc12dacf513227ee5c9815a16a3aaa1300f27
commit: 510a0561d60eb462dc8762e0482ec7439731b9bb [14/19] dyndbg: add print-to-tracefs,
selftest with it - RFC
config: hexagon-randconfig-r041-20211015 (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/510a0561d60eb462dc8762e0482ec7439731...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 510a0561d60eb462dc8762e0482ec7439731b9bb
# 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:441: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:743: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:743:3: note: did you mean 'trace_printk'?
include/linux/kernel.h:467:5: note: 'trace_printk' declared here
int trace_printk(const char *fmt, ...)
^
2 errors generated.
vim +441 lib/dynamic_debug.c
435
436
437 static int ddebug_validate_flags(struct flag_settings *modifiers)
438 {
439 #if !defined(CONFIG_TRACING)
440 if (modifiers->flags & _DPRINTK_FLAGS_TRACE) {
441 WARN_ONCE("cannot enable T, CONFIG_TRACE=n\n");
442 return -EINVAL;
443 }
444 #endif
445 return 0;
446 }
447 /*
448 * Parse `str' as a flags specification, format [-+=][p]+.
449 * Sets up *maskp and *flagsp to be used when changing the
450 * flags fields of matched _ddebug's. Returns 0 on success
451 * or <0 on error.
452 */
453 static int ddebug_parse_flags(const char *str, struct flag_settings *modifiers)
454 {
455 int op, i;
456
457 switch (*str) {
458 case '+':
459 case '-':
460 case '=':
461 op = *str++;
462 break;
463 default:
464 pr_err("bad flag-op %c, at start of %s\n", *str, str);
465 return -EINVAL;
466 }
467 v3pr_info("op=<%c>\n", op);
468
469 for (; *str ; ++str) {
470 for (i = ARRAY_SIZE(opt_array) - 1; i >= 0; i--) {
471 if (*str == opt_array[i].opt_char) {
472 modifiers->flags |= opt_array[i].flag;
473 break;
474 }
475 }
476 if (i < 0) {
477 pr_err("unknown flag '%c'\n", *str);
478 return -EINVAL;
479 }
480 }
481 v3pr_info("flags=0x%x\n", modifiers->flags);
482
483 /* calculate final flags, mask based upon op */
484 switch (op) {
485 case '=':
486 /* modifiers->flags already set */
487 modifiers->mask = 0;
488 break;
489 case '+':
490 modifiers->mask = ~0U;
491 break;
492 case '-':
493 modifiers->mask = ~modifiers->flags;
494 modifiers->flags = 0;
495 break;
496 }
497 v3pr_info("*flagsp=0x%x *maskp=0x%x\n", modifiers->flags,
modifiers->mask);
498
499 return ddebug_validate_flags(modifiers);
500 }
501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org