[PATCH 1/3] riscv: Support for early console.

kernel test robot lkp at intel.com
Wed Apr 10 12:57:30 PDT 2024


Hi Jinglin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus linus/master v6.9-rc3 next-20240410]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jinglin-Wen/riscv-Support-for-early-console/20240410-143840
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link:    https://lore.kernel.org/r/20240410063432.23058-2-jinglin.wen%40shingroup.cn
patch subject: [PATCH 1/3] riscv: Support for early console.
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20240411/202404110326.Qa9YV4bV-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240411/202404110326.Qa9YV4bV-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404110326.Qa9YV4bV-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/riscv/kernel/early_console.c: In function 'early_console_printf':
>> arch/riscv/kernel/early_console.c:51:17: warning: function 'early_console_printf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
      51 |                 vsnprintf(buf, EARLY_CONSOLE_BUFSIZE, fmt, args);
         |                 ^~~~~~~~~


vim +51 arch/riscv/kernel/early_console.c

    42	
    43	#define EARLY_CONSOLE_BUFSIZE 256
    44	void early_console_printf(const char *fmt, ...)
    45	{
    46		if (riscv_early_console_putc) {
    47			char buf[EARLY_CONSOLE_BUFSIZE];
    48			va_list args;
    49	
    50			va_start(args, fmt);
  > 51			vsnprintf(buf, EARLY_CONSOLE_BUFSIZE, fmt, args);
    52			early_console_puts(buf);
    53			va_end(args);
    54		}
    55	}
    56	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-riscv mailing list