All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:v5.5-rc1_unleashed 5/10] arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown'
@ 2019-12-10 16:53 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-10 16:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 11817 bytes --]

tree:   https://github.com/avpatel/linux.git v5.5-rc1_unleashed
head:   ab73ead92747e3a2041e7447329757d65a8d4775
commit: f88d1de8b7daf639029132dbcf7355563226ca3e [5/10] RISC-V: Introduce a new config for SBI v0.1
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.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 f88d1de8b7daf639029132dbcf7355563226ca3e
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.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

a34f89a34d9287 Atish Patra       2019-11-26  326  
a34f89a34d9287 Atish Patra       2019-11-26  327  static long sbi_get_firmware_version(void)
a34f89a34d9287 Atish Patra       2019-11-26  328  {
a34f89a34d9287 Atish Patra       2019-11-26  329  	struct sbiret ret;
a34f89a34d9287 Atish Patra       2019-11-26  330  
a34f89a34d9287 Atish Patra       2019-11-26 @331  	ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
a34f89a34d9287 Atish Patra       2019-11-26  332  			       0, 0, 0, 0, 0, 0);
a34f89a34d9287 Atish Patra       2019-11-26  333  	if (!ret.error)
a34f89a34d9287 Atish Patra       2019-11-26  334  		return ret.value;
a34f89a34d9287 Atish Patra       2019-11-26  335  	else
a34f89a34d9287 Atish Patra       2019-11-26  336  		return sbi_err_map_linux_errno(ret.error);
a34f89a34d9287 Atish Patra       2019-11-26  337  }
a34f89a34d9287 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: 5230 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-10 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 16:53 [avpatel:v5.5-rc1_unleashed 5/10] arch/riscv/kernel/sbi.c:341:2: error: implicit declaration of function 'sbi_shutdown' kbuild 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.