Hi Paulo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url:
https://github.com/0day-ci/linux/commits/Paulo-Miguel-Almeida/staging-pi4...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
f2c461536226eb0852a241e72b9125685d6741b4
config: arc-randconfig-r043-20220211
(
https://download.01.org/0day-ci/archive/20220211/202202111821.UaNmElDF-lk...)
compiler: arc-elf-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/0day-ci/linux/commit/a7ea3ecd6bd7905c6ee495a1053108c2b...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Paulo-Miguel-Almeida/staging-pi433-add-rf69_dbg_hex-function/20220211-160900
git checkout a7ea3ecd6bd7905c6ee495a1053108c2bb922ec2
# 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=arc SHELL=/bin/bash drivers/staging/pi433/
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 >>):
drivers/staging/pi433/rf69.c: In function 'rf69_dbg_hex':
> drivers/staging/pi433/rf69.c:837:9: warning: function
'rf69_dbg_hex' might be a candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
837 | text_pos = vscnprintf(text,
sizeof(textbuf), fmt, args);
| ^~~~~~~~
vim +837 drivers/staging/pi433/rf69.c
824
825 static void rf69_dbg_hex(struct spi_device *spi, u8 *buf, unsigned int size,
826 const char *fmt, ...)
827 {
828 va_list args;
829 char textbuf[512] = {};
830 char *text = textbuf;
831 int text_pos;
832
833 int rowsize = 16;
834 int i, linelen, remaining = size;
835
836 va_start(args, fmt);
837 text_pos = vscnprintf(text, sizeof(textbuf), fmt, args);
838 text += text_pos;
839 va_end(args);
840
841 for (i = 0; i < size; i += rowsize) {
842 linelen = min(remaining, rowsize);
843 remaining -= rowsize;
844
845 hex_dump_to_buffer(buf + i, linelen, rowsize, 1,
846 text, sizeof(textbuf) - text_pos, false);
847
848 dev_dbg(&spi->dev, "%s\n", textbuf);
849
850 memset(text, 0, sizeof(textbuf) - text_pos);
851 }
852 }
853
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org