* [linux-rt-devel:linux-5.10.y-rt 231/232] kernel/printk/printk.c:1804:2: warning: function 'printk_sprint' might be a candidate for 'gnu_printf' format attribute
@ 2020-12-01 16:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-01 16:03 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.10.y-rt
head: 8b7f7e411be72aca1b7074014a9537f90b9dd399
commit: acf5b481a0d7ce0e9c1e9a06c9ce4195a759bcdd [231/232] printk: Update the printk code
config: c6x-randconfig-r036-20201201 (attached as .config)
compiler: c6x-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/rt/linux-rt-devel.git/commit/?id=acf5b481a0d7ce0e9c1e9a06c9ce4195a759bcdd
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.10.y-rt
git checkout acf5b481a0d7ce0e9c1e9a06c9ce4195a759bcdd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/printk/printk.c: In function 'printk_sprint':
>> kernel/printk/printk.c:1804:2: warning: function 'printk_sprint' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1804 | text_len = vscnprintf(text, size, fmt, args);
| ^~~~~~~~
/tmp/cc3ZG4qC.s: Assembler messages:
/tmp/cc3ZG4qC.s:9465: Warning: ignoring changed section attributes for .far
vim +1804 kernel/printk/printk.c
1797
1798 static u16 printk_sprint(char *text, u16 size, int facility, enum log_flags *lflags,
1799 const char *fmt, va_list args)
1800 {
1801 char *orig_text = text;
1802 u16 text_len;
1803
> 1804 text_len = vscnprintf(text, size, fmt, args);
1805
1806 /* Mark and strip a trailing newline. */
1807 if (text_len && text[text_len - 1] == '\n') {
1808 text_len--;
1809 *lflags |= LOG_NEWLINE;
1810 }
1811
1812 /* Strip kernel syslog prefix. */
1813 if (facility == 0) {
1814 while (text_len >= 2 && printk_get_level(text)) {
1815 text_len -= 2;
1816 text += 2;
1817 }
1818
1819 if (text != orig_text)
1820 memmove(orig_text, text, text_len);
1821 }
1822
1823 return text_len;
1824 }
1825
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 22198 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-01 16:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 16:03 [linux-rt-devel:linux-5.10.y-rt 231/232] kernel/printk/printk.c:1804:2: warning: function 'printk_sprint' might be a candidate for 'gnu_printf' format attribute kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.