Re: [PATCH] staging: pi433: add rf69_dbg_hex function
by kernel test robot
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
7 months, 1 week
Undelivered Mail Returned to Sender
by Mail Delivery System
This is the mail system at host ml01.01.org.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<kbuild-all(a)lists.01.org>: host 127.0.0.1[127.0.0.1] said: 550 No Message-ID
header provided (in reply to end of DATA command)
Final-Recipient: rfc822; kbuild-all(a)lists.01.org
Original-Recipient: rfc822;kbuild-all(a)lists.01.org
Action: failed
Status: 5.0.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 550 No Message-ID header provided
.74; helo=3Dlocalhost; envelope-from=3Dkbuild-all(a)lists.01.org; receiver=3D=
<UNKNOWN>=20
Received: from localhost (unknown [121.61.136.74])
by ml01.01.org (Postfix) with UTF8SMTP id 7E10B100EAB68
for <kbuild-all(a)lists.01.org>; Fri, 11 Feb 2022 01:56:39 -0800 (PST)
From: "jack" <kbuild-all(a)lists.01.org>
Date: Fri, 11 Feb 2022 17:56:37 +0800
To: kbuild-all(a)lists.01.org
Subject: =3D?UTF-8?B?d2hvbGVzYWxlIG9sZCBtb2JpbGUgcGhvbmVzIGF0IGNoZWFwIHBy=
aWNlcw=3D=3D?=3D
Reply-To: jack_helloworld(a)163.com
MIME-Version: 1.0
Importance: high
Content-Type: text/html; charset=3Dutf-8
hi,<br><p>i'm jack from shenzhen, china. professionally provide used mobi=
le phones with competitive prices to global customers, add whtasapp video=
to buy mobile phones.<br>provide second-hand mobile phones of all brands=
in the world, such as: apple, huawei, samsung, xiaomi, vivo, oppo, etc.<=
br>please contact us. (wholesale, retail, one piece also shipped)</p><p>w=
hatsapp:+86 13423994073 jack</p>
7 months, 1 week
Undelivered Mail Returned to Sender
by Mail Delivery System
This is the mail system at host ml01.01.org.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<kbuild-all(a)lists.01.org>: host 127.0.0.1[127.0.0.1] said: 550 No Message-ID
header provided (in reply to end of DATA command)
Final-Recipient: rfc822; kbuild-all(a)lists.01.org
Original-Recipient: rfc822;kbuild-all(a)lists.01.org
Action: failed
Status: 5.0.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 550 No Message-ID header provided
.74; helo=3Dlocalhost; envelope-from=3Dkbuild-all(a)lists.01.org; receiver=3D=
<UNKNOWN>=20
Received: from localhost (unknown [121.61.136.74])
by ml01.01.org (Postfix) with UTF8SMTP id E09E9100EAB68
for <kbuild-all(a)lists.01.org>; Fri, 11 Feb 2022 01:56:36 -0800 (PST)
From: "jack" <kbuild-all(a)lists.01.org>
Date: Fri, 11 Feb 2022 17:56:35 +0800
To: kbuild-all(a)lists.01.org
Subject: =3D?UTF-8?B?d2hvbGVzYWxlIG9sZCBtb2JpbGUgcGhvbmVzIGF0IGNoZWFwIHBy=
aWNlcw=3D=3D?=3D
Reply-To: jack_helloworld(a)163.com
MIME-Version: 1.0
Importance: high
Content-Type: text/html; charset=3Dutf-8
hi,<br><p>i'm jack from shenzhen, china. professionally provide used mobi=
le phones with competitive prices to global customers, add whtasapp video=
to buy mobile phones.<br>provide second-hand mobile phones of all brands=
in the world, such as: apple, huawei, samsung, xiaomi, vivo, oppo, etc.<=
br>please contact us. (wholesale, retail, one piece also shipped)</p><p>w=
hatsapp:+86 13423994073 jack</p>
7 months, 1 week
Undelivered Mail Returned to Sender
by Mail Delivery System
This is the mail system at host ml01.01.org.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<kbuild-all(a)lists.01.org>: host 127.0.0.1[127.0.0.1] said: 550 No Message-ID
header provided (in reply to end of DATA command)
Final-Recipient: rfc822; kbuild-all(a)lists.01.org
Original-Recipient: rfc822;kbuild-all(a)lists.01.org
Action: failed
Status: 5.0.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 550 No Message-ID header provided
.74; helo=3Dlocalhost; envelope-from=3Dkbuild-all(a)lists.01.org; receiver=3D=
<UNKNOWN>=20
Received: from localhost (unknown [121.61.136.74])
by ml01.01.org (Postfix) with UTF8SMTP id 62D99100EAB68
for <kbuild-all(a)lists.01.org>; Fri, 11 Feb 2022 01:55:11 -0800 (PST)
From: "jack" <kbuild-all(a)lists.01.org>
Date: Fri, 11 Feb 2022 17:55:09 +0800
To: kbuild-all(a)lists.01.org
Subject: =3D?UTF-8?B?d2hvbGVzYWxlIG9sZCBtb2JpbGUgcGhvbmVzIGF0IGNoZWFwIHBy=
aWNlcw=3D=3D?=3D
Reply-To: jack_helloworld(a)163.com
MIME-Version: 1.0
Importance: high
Content-Type: text/html; charset=3Dutf-8
hi,<br><p>i'm jack from shenzhen, china. professionally provide used mobi=
le phones with competitive prices to global customers, add whtasapp video=
to buy mobile phones.<br>provide second-hand mobile phones of all brands=
in the world, such as: apple, huawei, samsung, xiaomi, vivo, oppo, etc.<=
br>please contact us. (wholesale, retail, one piece also shipped)</p><p>w=
hatsapp:+86 13423994073 jack</p>
7 months, 1 week
[avpatel:riscv_sbi_hsm_suspend_v11 6/8] drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: error: implicit declaration of function 'cpuid_to_hartid_map'
by kernel test robot
tree: https://github.com/avpatel/linux.git riscv_sbi_hsm_suspend_v11
head: 23c200d61b016e3b70c0f352ee89d8ff0511ba82
commit: 64abac12078cac4dcf481c1cb8f4bc72d9049bae [6/8] cpuidle: Add RISC-V SBI CPU idle driver
config: riscv-randconfig-r016-20220211 (https://download.01.org/0day-ci/archive/20220211/202202111718.2xBAlFri-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project f6685f774697c85d6a352dcea013f46a99f9fe31)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/avpatel/linux/commit/64abac12078cac4dcf481c1cb8f4bc72d...
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_sbi_hsm_suspend_v11
git checkout 64abac12078cac4dcf481c1cb8f4bc72d9049bae
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:350:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:576:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:359:10: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:489:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: error: implicit declaration of function 'cpuid_to_hartid_map' [-Werror,-Wimplicit-function-declaration]
cpuid_to_hartid_map(cpu));
^
drivers/cpuidle/cpuidle-riscv-sbi.c:567:6: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
cpuid_to_hartid_map(cpu));
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:576:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:132:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
include/linux/printk.h:446:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
3 warnings and 3 errors generated.
vim +/cpuid_to_hartid_map +350 drivers/cpuidle/cpuidle-riscv-sbi.c
317
318 static int sbi_cpuidle_init_cpu(struct device *dev, int cpu)
319 {
320 struct cpuidle_driver *drv;
321 unsigned int state_count = 0;
322 int ret = 0;
323
324 drv = devm_kzalloc(dev, sizeof(*drv), GFP_KERNEL);
325 if (!drv)
326 return -ENOMEM;
327
328 drv->name = "sbi_cpuidle";
329 drv->owner = THIS_MODULE;
330 drv->cpumask = (struct cpumask *)cpumask_of(cpu);
331
332 /* RISC-V architectural WFI to be represented as state index 0. */
333 drv->states[0].enter = sbi_cpuidle_enter_state;
334 drv->states[0].exit_latency = 1;
335 drv->states[0].target_residency = 1;
336 drv->states[0].power_usage = UINT_MAX;
337 strcpy(drv->states[0].name, "WFI");
338 strcpy(drv->states[0].desc, "RISC-V WFI");
339
340 /*
341 * If no DT idle states are detected (ret == 0) let the driver
342 * initialization fail accordingly since there is no reason to
343 * initialize the idle driver if only wfi is supported, the
344 * default archictectural back-end already executes wfi
345 * on idle entry.
346 */
347 ret = dt_init_idle_driver(drv, sbi_cpuidle_state_match, 1);
348 if (ret <= 0) {
349 pr_debug("HART%ld: failed to parse DT idle states\n",
> 350 cpuid_to_hartid_map(cpu));
351 return ret ? : -ENODEV;
352 }
353 state_count = ret + 1; /* Include WFI state as well */
354
355 /* Initialize idle states from DT. */
356 ret = sbi_cpuidle_dt_init_states(dev, drv, cpu, state_count);
357 if (ret) {
358 pr_err("HART%ld: failed to init idle states\n",
359 cpuid_to_hartid_map(cpu));
360 return ret;
361 }
362
363 ret = cpuidle_register(drv, NULL);
364 if (ret)
365 goto deinit;
366
367 cpuidle_cooling_register(drv);
368
369 return 0;
370 deinit:
371 sbi_cpuidle_deinit_cpu(cpu);
372 return ret;
373 }
374
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week