tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git mips-next
head: df3da04880b45b059b8b064c2dd67289a793109e
commit: 7784cac697351f0cc0a4bb619594c0c99348c5aa [68/69] MIPS: cmdline: Clean up
boot_command_line initialization
config: mips-fuloong2e_defconfig (attached as .config)
compiler: mips64el-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 7784cac697351f0cc0a4bb619594c0c99348c5aa
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/mips/kernel/setup.c: In function 'bootcmdline_scan_chosen':
> arch/mips/kernel/setup.c:563:6: error: implicit declaration of
function 'of_get_flat_dt_prop'; did you mean 'vm_get_page_prot'?
[-Werror=implicit-function-declaration]
p = of_get_flat_dt_prop(node,
"bootargs", &l);
^~~~~~~~~~~~~~~~~~~
vm_get_page_prot
> arch/mips/kernel/setup.c:563:4: error: assignment makes pointer
from integer without a cast [-Werror=int-conversion]
p =
of_get_flat_dt_prop(node, "bootargs", &l);
^
arch/mips/kernel/setup.c: In function 'bootcmdline_init':
arch/mips/kernel/setup.c:582:30: error: 'builtin_cmdline' undeclared (first use
in this function); did you mean 'builtin_driver'?
strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
^~~~~~~~~~~~~~~
builtin_driver
arch/mips/kernel/setup.c:582:30: note: each undeclared identifier is reported only once
for each function it appears in
> arch/mips/kernel/setup.c:603:3: error: implicit declaration of
function 'of_scan_flat_dt' [-Werror=implicit-function-declaration]
of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs);
^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +563 arch/mips/kernel/setup.c
551
552 static int __init bootcmdline_scan_chosen(unsigned long node, const char *uname,
553 int depth, void *data)
554 {
555 bool *dt_bootargs = data;
556 const char *p;
557 int l;
558
559 if (depth != 1 || !data ||
560 (strcmp(uname, "chosen") != 0 && strcmp(uname,
"chosen@0") != 0))
561 return 0;
562
563 p = of_get_flat_dt_prop(node, "bootargs", &l);
564 if (p != NULL && l > 0) {
565 bootcmdline_append(p, min(l, COMMAND_LINE_SIZE));
566 *dt_bootargs = true;
567 }
568
569 return 1;
570 }
571
572 static void __init bootcmdline_init(char **cmdline_p)
573 {
574 bool dt_bootargs = false;
575
576 /*
577 * If CMDLINE_OVERRIDE is enabled then initializing the command line is
578 * trivial - we simply use the built-in command line unconditionally &
579 * unmodified.
580 */
581 if (IS_ENABLED(CONFIG_CMDLINE_OVERRIDE)) {
582 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
583 return;
584 }
585
586 /*
587 * If the user specified a built-in command line &
588 * MIPS_CMDLINE_BUILTIN_EXTEND, then the built-in command line is
589 * prepended to arguments from the bootloader or DT so we'll copy them
590 * to the start of boot_command_line here. Otherwise, empty
591 * boot_command_line to undo anything early_init_dt_scan_chosen() did.
592 */
593 if (IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))
594 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
595 else
596 boot_command_line[0] = 0;
597
598 /*
599 * If we're configured to take boot arguments from DT, look for those
600 * now.
601 */
602 if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB))
603 of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs);
604
605 /*
606 * If we didn't get any arguments from DT (regardless of whether that's
607 * because we weren't configured to look for them, or because we looked
608 * & found none) then we'll take arguments from the bootloader.
609 * plat_mem_setup() should have filled arcs_cmdline with arguments from
610 * the bootloader.
611 */
612 if (IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND) || !dt_bootargs)
613 bootcmdline_append(arcs_cmdline, COMMAND_LINE_SIZE);
614
615 /*
616 * If the user specified a built-in command line & we didn't already
617 * prepend it, we append it to boot_command_line here.
618 */
619 if (IS_ENABLED(CONFIG_CMDLINE_BOOL) &&
620 !IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))
621 bootcmdline_append(builtin_cmdline, COMMAND_LINE_SIZE);
622 }
623
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation