arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'

瀏覽次數:3 次
跳到第一則未讀訊息

kernel test robot

未讀,
2021年8月14日 凌晨1:42:572021/8/14
收件者:Geert Uytterhoeven、clang-bu...@googlegroups.com、kbuil...@lists.01.org、linux-...@vger.kernel.org、Russell King、Ard Biesheuvel
Hi Geert,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dfa377c35d70c31139b1274ec49f87d380996c42
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date: 6 months ago
config: arm-randconfig-r003-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0673cb38951215060d7993b43ad3c45cd413c2c3
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0673cb38951215060d7993b43ad3c45cd413c2c3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

>> arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start' [-Wmissing-prototypes]
uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
^
arch/arm/boot/compressed/fdt_check_mem_start.c:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)
^
static
1 warning generated.


vim +/fdt_check_mem_start +62 arch/arm/boot/compressed/fdt_check_mem_start.c

46
47 /*
48 * Check the start of physical memory
49 *
50 * Traditionally, the start address of physical memory is obtained by masking
51 * the program counter. However, this does require that this address is a
52 * multiple of 128 MiB, precluding booting Linux on platforms where this
53 * requirement is not fulfilled.
54 * Hence validate the calculated address against the memory information in the
55 * DTB, and, if out-of-range, replace it by the real start address.
56 * To preserve backwards compatibility (systems reserving a block of memory
57 * at the start of physical memory, kdump, ...), the traditional method is
58 * always used if it yields a valid address.
59 *
60 * Return value: start address of physical memory to use
61 */
> 62 uint32_t fdt_check_mem_start(uint32_t mem_start, const void *fdt)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org
.config.gz

Geert Uytterhoeven

未讀,
2021年8月21日 凌晨4:46:092021/8/21
收件者:kernel test robot、clang-built-linux、kbuil...@lists.01.org、Linux Kernel Mailing List、Russell King、Ard Biesheuvel
Dear Robot,

On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <l...@intel.com> wrote:
> FYI, the error/warning still remains.

Yes, and that's fine, as this function is never called from C code,
only from assembler.
--
Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Chen, Rong A

未讀,
2021年8月23日 清晨5:14:402021/8/23
收件者:Geert Uytterhoeven、kernel test robot、clang-built-linux、kbuil...@lists.01.org、Linux Kernel Mailing List、Russell King、Ard Biesheuvel


On 8/21/2021 4:45 PM, Geert Uytterhoeven wrote:
> Dear Robot,
>
> On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <l...@intel.com> wrote:
>> FYI, the error/warning still remains.
>
> Yes, and that's fine, as this function is never called from C code,
> only from assembler.


Hi Geert,

Thanks for the feedback, we'll ignore this warning.

Best Regards,
Rong Chen

Nick Desaulniers

未讀,
2021年8月25日 下午1:41:152021/8/25
收件者:Geert Uytterhoeven、kernel test robot、clang-built-linux、kbuil...@lists.01.org、Linux Kernel Mailing List、Russell King、Ard Biesheuvel
On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <ge...@linux-m68k.org> wrote:
>
> Dear Robot,
>
> On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <l...@intel.com> wrote:
> > FYI, the error/warning still remains.
>
> Yes, and that's fine, as this function is never called from C code,
> only from assembler.

That's fine, then you can add a prototype to the .c source file. See
what we do for stpcpy: 1e1b6d63d6340.
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAMuHMdXUpk_dLhvcdgs1H6yLPrwXFJz_86dfXpm8PYxNq%2BDXrQ%40mail.gmail.com.



--
Thanks,
~Nick Desaulniers

Ard Biesheuvel

未讀,
2021年8月26日 凌晨3:02:372021/8/26
收件者:Nick Desaulniers、Geert Uytterhoeven、kernel test robot、clang-built-linux、kbuil...@lists.01.org、Linux Kernel Mailing List、Russell King
On Wed, 25 Aug 2021 at 19:41, Nick Desaulniers <ndesau...@google.com> wrote:
>
> On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <ge...@linux-m68k.org> wrote:
> >
> > Dear Robot,
> >
> > On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <l...@intel.com> wrote:
> > > FYI, the error/warning still remains.
> >
> > Yes, and that's fine, as this function is never called from C code,
> > only from assembler.
>
> That's fine, then you can add a prototype to the .c source file. See
> what we do for stpcpy: 1e1b6d63d6340.
>

We should use 'asmlinkage' for this - we should add it to the
definition of this function, and we should teach the tooling that
'asmlinkage' functions don't need a prototype.
回覆所有人
回覆作者
轉寄
0 則新訊息