From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [avpatel:riscv_kvm_v10 5/31] arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown'
Date: Sat, 30 Nov 2019 10:58:07 +0800 [thread overview]
Message-ID: <201911301002.hWT2Ie0m%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 11812 bytes --]
tree: https://github.com/avpatel/linux.git riscv_kvm_v10
head: adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: ccdc1f5cf0b366a9a0600bfd4b5333f2fc8b7351 [5/31] RISC-V: Introduce a new config for SBI v0.1
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ccdc1f5cf0b366a9a0600bfd4b5333f2fc8b7351
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:61: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:65: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
arch/riscv/kernel/sbi.c: In function 'sbi_remote_fence_i':
arch/riscv/kernel/sbi.c:240:15: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
arch/riscv/kernel/sbi.c:258:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
arch/riscv/kernel/sbi.c:279:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
arch/riscv/kernel/sbi.c:292:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:294:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:294:32: error: 'SBI_BASE_PROBE_EXT' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:292:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:305:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:307:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:307:32: error: 'SBI_BASE_GET_SPEC_VERSION' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:305:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:317:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:319:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:319:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:317:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:329:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:331:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:331:32: error: 'SBI_BASE_GET_IMP_VERSION' undeclared (first use in this function); did you mean '__GXX_ABI_VERSION'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~
__GXX_ABI_VERSION
arch/riscv/kernel/sbi.c:329:16: warning: unused variable 'ret' [-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_power_off':
>> arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown' [-Werror=implicit-function-declaration]
sbi_shutdown();
^~~~~~~~~~~~
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
arch/riscv/kernel/sbi.c: In function 'sbi_init':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:353:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:353:32: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
arch/riscv/kernel/sbi.c:353:2: note: in expansion of macro 'pr_info'
pr_info("SBI specification v%lu.%lu detected\n",
^~~~~~~
arch/riscv/kernel/sbi.c:353:36: note: format string is defined here
pr_info("SBI specification v%lu.%lu detected\n",
~~^
%u
arch/riscv/kernel/sbi.c:356:7: error: implicit declaration of function 'sbi_spec_is_0_1' [-Werror=implicit-function-declaration]
if (!sbi_spec_is_0_1()) {
^~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:313:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:325:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
arch/riscv/kernel/sbi.c:337:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/sbi_shutdown +341 arch/riscv/kernel/sbi.c
16e90702b40cf6 Atish Patra 2019-11-26 326
16e90702b40cf6 Atish Patra 2019-11-26 327 static long sbi_get_firmware_version(void)
16e90702b40cf6 Atish Patra 2019-11-26 328 {
16e90702b40cf6 Atish Patra 2019-11-26 329 struct sbiret ret;
16e90702b40cf6 Atish Patra 2019-11-26 330
16e90702b40cf6 Atish Patra 2019-11-26 @331 ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
16e90702b40cf6 Atish Patra 2019-11-26 332 0, 0, 0, 0, 0, 0);
16e90702b40cf6 Atish Patra 2019-11-26 333 if (!ret.error)
16e90702b40cf6 Atish Patra 2019-11-26 334 return ret.value;
16e90702b40cf6 Atish Patra 2019-11-26 335 else
16e90702b40cf6 Atish Patra 2019-11-26 336 return sbi_err_map_linux_errno(ret.error);
16e90702b40cf6 Atish Patra 2019-11-26 337 }
16e90702b40cf6 Atish Patra 2019-11-26 338
3320648ecc3819 Christoph Hellwig 2019-10-28 339 static void sbi_power_off(void)
3320648ecc3819 Christoph Hellwig 2019-10-28 340 {
3320648ecc3819 Christoph Hellwig 2019-10-28 @341 sbi_shutdown();
3320648ecc3819 Christoph Hellwig 2019-10-28 342 }
3320648ecc3819 Christoph Hellwig 2019-10-28 343
:::::: The code at line 341 was first introduced by commit
:::::: 3320648ecc38190caad298fbbce949f591a10253 riscv: cleanup the default power off implementation
:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Paul Walmsley <paul.walmsley@sifive.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 5264 bytes --]
reply other threads:[~2019-11-30 2:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201911301002.hWT2Ie0m%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.