tree:
https://github.com/jimc/linux.git dyn-drm-trc
head: 21798489725b7deafd2bd79afa477a68a4840dda
commit: f5b0d82213a36476415ce55e223acd3ee8e7fcf8 [4/20] dyndbg: s/dynamic_/ddebug_/
config: riscv-randconfig-r042-20220123
(
https://download.01.org/0day-ci/archive/20220124/202201241735.ZhHKTlca-lk...)
compiler: riscv32-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/jimc/linux/commit/f5b0d82213a36476415ce55e223acd3ee8e7...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc dyn-drm-trc
git checkout f5b0d82213a36476415ce55e223acd3ee8e7fcf8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=riscv SHELL=/bin/bash
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 >>):
lib/dynamic_debug.c:646:34: error: array type has incomplete element type 'struct
dynamic_trace_buf'
646 | struct dynamic_trace_buf bufs[DYNAMIC_TRACE_NESTING];
| ^~~~
lib/dynamic_debug.c: In function 'ddebug_trace':
lib/dynamic_debug.c:670:29: error: invalid use of undefined type 'struct
dynamic_trace_buf'
670 | len = vscnprintf(buf->buf, sizeof(buf->buf), fmt, args);
| ^~
lib/dynamic_debug.c:670:46: error: invalid use of undefined type 'struct
dynamic_trace_buf'
670 | len = vscnprintf(buf->buf, sizeof(buf->buf), fmt, args);
| ^~
lib/dynamic_debug.c:671:26: error: invalid use of undefined type 'struct
dynamic_trace_buf'
671 | trace_console(buf->buf, len);
| ^~
lib/dynamic_debug.c: In function 'ddebug_printk':
> lib/dynamic_debug.c:698:17: warning: function
'ddebug_printk' might be a candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
698 | vprintk(fmt, args);
| ^~~~~~~
lib/dynamic_debug.c: In function 'ddebug_dev_printk':
> lib/dynamic_debug.c:719:17: warning: function
'ddebug_dev_printk' might be a candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
719 |
dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt, args);
| ^~~~~~~~~~~~~~~~
vim +698 lib/dynamic_debug.c
e60a9cdd5978eb Jim Cromie 2021-11-22 679
f5b0d82213a364 Jim Cromie 2022-01-21 680 static void ddebug_printk(unsigned int flags,
const char *fmt, ...)
e60a9cdd5978eb Jim Cromie 2021-11-22 681 {
e60a9cdd5978eb Jim Cromie 2021-11-22 682 if (flags & _DPRINTK_FLAGS_TRACE) {
e60a9cdd5978eb Jim Cromie 2021-11-22 683 va_list args;
e60a9cdd5978eb Jim Cromie 2021-11-22 684
e60a9cdd5978eb Jim Cromie 2021-11-22 685 va_start(args, fmt);
e60a9cdd5978eb Jim Cromie 2021-11-22 686 /*
e60a9cdd5978eb Jim Cromie 2021-11-22 687 * All callers include the KERN_DEBUG prefix
to keep the
e60a9cdd5978eb Jim Cromie 2021-11-22 688 * vprintk case simple; strip it out for
tracing.
e60a9cdd5978eb Jim Cromie 2021-11-22 689 */
f5b0d82213a364 Jim Cromie 2022-01-21 690 ddebug_trace(fmt + strlen(KERN_DEBUG),
args);
e60a9cdd5978eb Jim Cromie 2021-11-22 691 va_end(args);
e60a9cdd5978eb Jim Cromie 2021-11-22 692 }
e60a9cdd5978eb Jim Cromie 2021-11-22 693
e60a9cdd5978eb Jim Cromie 2021-11-22 694 if (flags & _DPRINTK_FLAGS_PRINTK) {
e60a9cdd5978eb Jim Cromie 2021-11-22 695 va_list args;
e60a9cdd5978eb Jim Cromie 2021-11-22 696
e60a9cdd5978eb Jim Cromie 2021-11-22 697 va_start(args, fmt);
e60a9cdd5978eb Jim Cromie 2021-11-22 @698 vprintk(fmt, args);
e60a9cdd5978eb Jim Cromie 2021-11-22 699 va_end(args);
e60a9cdd5978eb Jim Cromie 2021-11-22 700 }
e60a9cdd5978eb Jim Cromie 2021-11-22 701 }
e60a9cdd5978eb Jim Cromie 2021-11-22 702
f5b0d82213a364 Jim Cromie 2022-01-21 703 static void ddebug_dev_printk(unsigned int
flags, const struct device *dev,
e60a9cdd5978eb Jim Cromie 2021-11-22 704 const char *fmt, ...)
e60a9cdd5978eb Jim Cromie 2021-11-22 705 {
e60a9cdd5978eb Jim Cromie 2021-11-22 706
e60a9cdd5978eb Jim Cromie 2021-11-22 707 if (flags & _DPRINTK_FLAGS_TRACE) {
e60a9cdd5978eb Jim Cromie 2021-11-22 708 va_list args;
e60a9cdd5978eb Jim Cromie 2021-11-22 709
e60a9cdd5978eb Jim Cromie 2021-11-22 710 va_start(args, fmt);
f5b0d82213a364 Jim Cromie 2022-01-21 711 ddebug_trace(fmt, args);
e60a9cdd5978eb Jim Cromie 2021-11-22 712 va_end(args);
e60a9cdd5978eb Jim Cromie 2021-11-22 713 }
e60a9cdd5978eb Jim Cromie 2021-11-22 714
e60a9cdd5978eb Jim Cromie 2021-11-22 715 if (flags & _DPRINTK_FLAGS_PRINTK) {
e60a9cdd5978eb Jim Cromie 2021-11-22 716 va_list args;
e60a9cdd5978eb Jim Cromie 2021-11-22 717
e60a9cdd5978eb Jim Cromie 2021-11-22 718 va_start(args, fmt);
e60a9cdd5978eb Jim Cromie 2021-11-22 @719 dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt,
args);
e60a9cdd5978eb Jim Cromie 2021-11-22 720 va_end(args);
e60a9cdd5978eb Jim Cromie 2021-11-22 721 }
e60a9cdd5978eb Jim Cromie 2021-11-22 722 }
e60a9cdd5978eb Jim Cromie 2021-11-22 723
:::::: The code at line 698 was first introduced by commit
:::::: e60a9cdd5978ebaf8e65db1111ea2459359ea5e5 dyndbg: add write-to-tracefs code
:::::: TO: Jim Cromie <jim.cromie(a)gmail.com>
:::::: CC: Jim Cromie <jim.cromie(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org