diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-19 17:13:04 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-29 15:34:58 +0200 |
commit | 54fb07d030e1b2fa9d903a748f84398bbe6f213d (patch) | |
tree | 2667ea7b77c3bae0b5835fbb6b25114c23be1256 /arch/s390 | |
parent | b29cd7c4c482d895f4b13ef1dfe85550529f38c9 (diff) | |
download | linux-54fb07d030e1b2fa9d903a748f84398bbe6f213d.tar.bz2 |
s390/sclp: avoid using strncmp with hardcoded length
"earlyprintk" option documentation does not clearly state which
platform supports which additional values (e.g. ",keep"). Preserve old
option behaviour and reuse str_has_prefix instead of strncmp for prefix
testing.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/early_printk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/early_printk.c b/arch/s390/kernel/early_printk.c index 40c1dfec944e..6f24d83bc5dc 100644 --- a/arch/s390/kernel/early_printk.c +++ b/arch/s390/kernel/early_printk.c @@ -25,7 +25,7 @@ static int __init setup_early_printk(char *buf) if (early_console) return 0; /* Accept only "earlyprintk" and "earlyprintk=sclp" */ - if (buf && strncmp(buf, "sclp", 4)) + if (buf && !str_has_prefix(buf, "sclp")) return 0; if (!sclp.has_linemode && !sclp.has_vt220) return 0; |