]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/lib,string: fix strcat() inline asm constraint modifier
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 1 Jul 2021 10:28:48 +0000 (12:28 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 5 Jul 2021 10:44:23 +0000 (12:44 +0200)
"dummy" is not only used as output but also as input. Therefore use
the correct "+" constraint modifier.

Fixes: 4008ce4d4baf ("s390/lib,string: get rid of register asm")
Reported-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/lib/string.c

index ec5b76bde4d8d2f2939c623ebdcd49bb823edccd..cfcdf76d6a9573be23b9482504c054d9f6816285 100644 (file)
@@ -162,7 +162,7 @@ char *strcat(char *dest, const char *src)
                "       jo      0b\n"
                "1:     mvst    %[dummy],%[src]\n"
                "       jo      1b\n"
-               : [dummy] "=&a" (dummy), [dest] "+&a" (dest), [src] "+&a" (src)
+               : [dummy] "+&a" (dummy), [dest] "+&a" (dest), [src] "+&a" (src)
                :
                : "cc", "memory", "0");
        return ret;