All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-06-06  1:46 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-06-06  1:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: kbuild-all, clang-built-linux, linux-kernel, Russell King,
	Ard Biesheuvel

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

Hi Geert,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f5b6eb1e018203913dfefcf6fa988649ad11ad6e
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date:   4 months ago
config: arm-randconfig-r036-20210606 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ec9aa236e325fd4629cfeefac2919302e14d61a)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 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 <lkp@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/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35287 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-06-06  1:46 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-06-06  1:46 UTC (permalink / raw)
  To: kbuild-all

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

Hi Geert,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f5b6eb1e018203913dfefcf6fa988649ad11ad6e
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date:   4 months ago
config: arm-randconfig-r036-20210606 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ec9aa236e325fd4629cfeefac2919302e14d61a)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 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 <lkp@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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35287 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
  2021-08-25 17:41     ` Nick Desaulniers
@ 2021-08-26  7:02       ` Ard Biesheuvel
  -1 siblings, 0 replies; 15+ messages in thread
From: Ard Biesheuvel @ 2021-08-26  7:02 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Geert Uytterhoeven, kernel test robot, clang-built-linux,
	kbuild-all, Linux Kernel Mailing List, Russell King

On Wed, 25 Aug 2021 at 19:41, Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Dear Robot,
> >
> > On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

> >
> > > 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 <lkp@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/kbuild-all@lists.01.org
> >
> >
> >
> > --
> > Gr{oetje,eeting}s,
> >
> >                         Geert
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
> >
> > --
> > 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-linux+unsubscribe@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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-08-26  7:02       ` Ard Biesheuvel
  0 siblings, 0 replies; 15+ messages in thread
From: Ard Biesheuvel @ 2021-08-26  7:02 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, 25 Aug 2021 at 19:41, Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Dear Robot,
> >
> > On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

> >
> > > 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 <lkp@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/kbuild-all(a)lists.01.org
> >
> >
> >
> > --
> > Gr{oetje,eeting}s,
> >
> >                         Geert
> >
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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
> >
> > --
> > 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-linux+unsubscribe(a)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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
  2021-08-21  8:45   ` Geert Uytterhoeven
@ 2021-08-25 17:41     ` Nick Desaulniers
  -1 siblings, 0 replies; 15+ messages in thread
From: Nick Desaulniers @ 2021-08-25 17:41 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: kernel test robot, clang-built-linux, kbuild-all,
	Linux Kernel Mailing List, Russell King, Ard Biesheuvel

On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Dear Robot,
>
> On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

>
> > 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 <lkp@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/kbuild-all@lists.01.org
>
>
>
> --
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
>
> --
> 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-linux+unsubscribe@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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-08-25 17:41     ` Nick Desaulniers
  0 siblings, 0 replies; 15+ messages in thread
From: Nick Desaulniers @ 2021-08-25 17:41 UTC (permalink / raw)
  To: kbuild-all

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

On Sat, Aug 21, 2021 at 1:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Dear Robot,
>
> On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

>
> > 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 <lkp@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/kbuild-all(a)lists.01.org
>
>
>
> --
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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
>
> --
> 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-linux+unsubscribe(a)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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
  2021-08-21  8:45   ` Geert Uytterhoeven
  (?)
@ 2021-08-23  9:14   ` Chen, Rong A
  -1 siblings, 0 replies; 15+ messages in thread
From: Chen, Rong A @ 2021-08-23  9:14 UTC (permalink / raw)
  To: kbuild-all

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



On 8/21/2021 4:45 PM, Geert Uytterhoeven wrote:
> Dear Robot,
> 
> On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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

> 
>> 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 <lkp@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/kbuild-all(a)lists.01.org
> 
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
  2021-08-14  5:42 ` kernel test robot
@ 2021-08-21  8:45   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-08-21  8:45 UTC (permalink / raw)
  To: kernel test robot
  Cc: clang-built-linux, kbuild-all, Linux Kernel Mailing List,
	Russell King, Ard Biesheuvel

Dear Robot,

On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

> 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 <lkp@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/kbuild-all@lists.01.org



-- 
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-08-21  8:45   ` Geert Uytterhoeven
  0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-08-21  8:45 UTC (permalink / raw)
  To: kbuild-all

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

Dear Robot,

On Sat, Aug 14, 2021 at 7:43 AM kernel test robot <lkp@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.

> 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 <lkp@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/kbuild-all(a)lists.01.org



-- 
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-08-14  5:42 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-08-14  5:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: clang-built-linux, kbuild-all, linux-kernel, Russell King,
	Ard Biesheuvel

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

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 <lkp@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/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37052 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-08-14  5:42 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-08-14  5:42 UTC (permalink / raw)
  To: kbuild-all

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

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 <lkp@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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37052 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
  2021-02-27  2:46 ` kernel test robot
@ 2021-02-27  9:54   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-02-27  9:54 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, clang-built-linux, Linux Kernel Mailing List,
	Russell King, Ard Biesheuvel

Hi Kernel Test Robot,

On Sat, Feb 27, 2021 at 3:47 AM kernel test robot <lkp@intel.com> wrote:
> FYI, the error/warning still remains.

My response in
https://lore.kernel.org/linux-arm-kernel/CAMuHMdVmMLvvJ4mAa+y8JCJ2+5Bwu2W=psgn3toC1msTghn=Xg@mail.gmail.com/
is still valid.

>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
> commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
> date:   4 weeks ago
> config: arm-randconfig-r003-20210226 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
> 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 arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # 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 <lkp@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/kbuild-all@lists.01.org



-- 
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-02-27  9:54   ` Geert Uytterhoeven
  0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2021-02-27  9:54 UTC (permalink / raw)
  To: kbuild-all

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

Hi Kernel Test Robot,

On Sat, Feb 27, 2021 at 3:47 AM kernel test robot <lkp@intel.com> wrote:
> FYI, the error/warning still remains.

My response in
https://lore.kernel.org/linux-arm-kernel/CAMuHMdVmMLvvJ4mAa+y8JCJ2+5Bwu2W=psgn3toC1msTghn=Xg(a)mail.gmail.com/
is still valid.

>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
> commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
> date:   4 weeks ago
> config: arm-randconfig-r003-20210226 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
> 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 arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # 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 <lkp@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/kbuild-all(a)lists.01.org



-- 
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert(a)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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-02-27  2:46 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-02-27  2:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: kbuild-all, clang-built-linux, linux-kernel, Russell King,
	Ard Biesheuvel

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

Hi Geert,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date:   4 weeks ago
config: arm-randconfig-r003-20210226 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 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 <lkp@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/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24047 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start'
@ 2021-02-27  2:46 ` kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2021-02-27  2:46 UTC (permalink / raw)
  To: kbuild-all

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

Hi Geert,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: 0673cb38951215060d7993b43ad3c45cd413c2c3 ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB
date:   4 weeks ago
config: arm-randconfig-r003-20210226 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b889ef4214bc6dc8880fdd4badc0dcd9a3197753)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 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 <lkp@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/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24047 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-26  7:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06  1:46 arch/arm/boot/compressed/fdt_check_mem_start.c:62:10: warning: no previous prototype for function 'fdt_check_mem_start' kernel test robot
2021-06-06  1:46 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-08-14  5:42 kernel test robot
2021-08-14  5:42 ` kernel test robot
2021-08-21  8:45 ` Geert Uytterhoeven
2021-08-21  8:45   ` Geert Uytterhoeven
2021-08-23  9:14   ` Chen, Rong A
2021-08-25 17:41   ` Nick Desaulniers
2021-08-25 17:41     ` Nick Desaulniers
2021-08-26  7:02     ` Ard Biesheuvel
2021-08-26  7:02       ` Ard Biesheuvel
2021-02-27  2:46 kernel test robot
2021-02-27  2:46 ` kernel test robot
2021-02-27  9:54 ` Geert Uytterhoeven
2021-02-27  9:54   ` Geert Uytterhoeven

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.