]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/boot: access kernel command line via parmarea
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 7 May 2021 17:12:54 +0000 (19:12 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 7 Jun 2021 15:06:59 +0000 (17:06 +0200)
Access the kernel command line via parmarea instead of using the
COMMAND_LINE define.
With this the following gcc11 warning is removed:

arch/s390/boot/ipl_parm.c: In function ‘setup_boot_command_line’:
arch/s390/boot/ipl_parm.c:168:50: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/ipl_parm.c

index 865c66cb9b792ff5a95d2373652b8e783a175f82..3485a1d4e97bfc14235f37748ca31e5d0e1d6c53 100644 (file)
@@ -165,12 +165,12 @@ static inline int has_ebcdic_char(const char *str)
 
 void setup_boot_command_line(void)
 {
-       COMMAND_LINE[ARCH_COMMAND_LINE_SIZE - 1] = 0;
+       parmarea.command_line[ARCH_COMMAND_LINE_SIZE - 1] = 0;
        /* convert arch command line to ascii if necessary */
-       if (has_ebcdic_char(COMMAND_LINE))
-               EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE);
+       if (has_ebcdic_char(parmarea.command_line))
+               EBCASC(parmarea.command_line, ARCH_COMMAND_LINE_SIZE);
        /* copy arch command line */
-       strcpy(early_command_line, strim(COMMAND_LINE));
+       strcpy(early_command_line, strim(parmarea.command_line));
 
        /* append IPL PARM data to the boot command line */
        if (!is_prot_virt_guest() && ipl_block_valid)