tree:
https://github.com/jimc/linux.git vincent
head: 019640b342b50f20562c48772b7a9383eee5f85e
commit: 94cdbcf9aa003a6bf6cb4d302d391693422f9903 [3/5] vincents dd.c code
config: mips-randconfig-r034-20211122
(
https://download.01.org/0day-ci/archive/20211123/202111232328.GQdLmFxd-lk...)
compiler: mipsel-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/94cdbcf9aa003a6bf6cb4d302d391693422f...
git remote add jimc
https://github.com/jimc/linux.git
git fetch --no-tags jimc vincent
git checkout 94cdbcf9aa003a6bf6cb4d302d391693422f9903
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
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:95:11: error: '_DPRINTK_FLAGS_TRACE' undeclared here (not
in a function)
95 | { _DPRINTK_FLAGS_TRACE, 'x' },
| ^~~~~~~~~~~~~~~~~~~~
lib/dynamic_debug.c: In function 'dynamic_trace':
> lib/dynamic_debug.c:669:9: warning: function
'dynamic_trace' might be a candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
669 | len = vscnprintf(buf->buf,
sizeof(buf->buf), fmt, args);
| ^~~
lib/dynamic_debug.c: In function 'dynamic_printk':
> lib/dynamic_debug.c:697:17: warning: function
'dynamic_printk' might be a candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
697 | vprintk(fmt, args);
| ^~~~~~~
lib/dynamic_debug.c: In function 'dynamic_dev_printk':
> lib/dynamic_debug.c:718:17: warning: function
'dynamic_dev_printk' might be a candidate for 'gnu_printf' format
attribute [-Wsuggest-attribute=format]
718 |
dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt, args);
| ^~~~~~~~~~~~~~~~
vim +669 lib/dynamic_debug.c
650
651 static void dynamic_trace(const char *fmt, va_list args)
652 {
653 struct dynamic_trace_buf *buf;
654 int bufidx;
655 int len;
656
657 preempt_disable_notrace();
658
659 bufidx = __this_cpu_inc_return(dynamic_trace_reserve) - 1;
660
661 if (WARN_ON_ONCE(bufidx > DYNAMIC_TRACE_NESTING))
662 goto out;
663
664 /* For the same reasons as in __ftrace_trace_stack(). */
665 barrier();
666
667 buf = this_cpu_ptr(dynamic_trace_bufs.bufs) + bufidx;
668
669 len = vscnprintf(buf->buf, sizeof(buf->buf), fmt, args);
670 trace_dyndbg(buf->buf, len);
671
672 out:
673 /* As above. */
674 barrier();
675 __this_cpu_dec(dynamic_trace_reserve);
676 preempt_enable_notrace();
677 }
678
679 static void dynamic_printk(unsigned int flags, const char *fmt, ...)
680 {
681 if (flags & _DPRINTK_FLAGS_TRACE) {
682 va_list args;
683
684 va_start(args, fmt);
685 /*
686 * All callers include the KERN_DEBUG prefix to keep the
687 * vprintk case simple; strip it out for tracing.
688 */
689 dynamic_trace(fmt + strlen(KERN_DEBUG), args);
690 va_end(args);
691 }
692
693 if (flags & _DPRINTK_FLAGS_PRINTK) {
694 va_list args;
695
696 va_start(args, fmt);
697 vprintk(fmt, args);
698 va_end(args);
699 }
700 }
701
702 static void dynamic_dev_printk(unsigned int flags, const struct device *dev,
703 const char *fmt, ...)
704 {
705
706 if (flags & _DPRINTK_FLAGS_TRACE) {
707 va_list args;
708
709 va_start(args, fmt);
710 dynamic_trace(fmt, args);
711 va_end(args);
712 }
713
714 if (flags & _DPRINTK_FLAGS_PRINTK) {
715 va_list args;
716
717 va_start(args, fmt);
718 dev_vprintk_emit(LOGLEVEL_DEBUG, dev, fmt, args);
719 va_end(args);
720 }
721 }
722
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org