From b2f583937aad0e43cdf18186070e5502983f60fd Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 1 Oct 2021 16:02:01 +0300 Subject: [PATCH] s390/cmm: use string_upper() instead of open coded variant Use string_upper() from string helper module instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20211001130201.72545-1-andriy.shevchenko@linux.intel.com [hca@linux.ibm.com: removed hunk which converts extmem.c] Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/mm/cmm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 1141c8d5c0d0..2203164b39da 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -14,8 +14,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -394,13 +394,10 @@ static int __init cmm_init(void) goto out_sysctl; #ifdef CONFIG_CMM_IUCV /* convert sender to uppercase characters */ - if (sender) { - int len = strlen(sender); - while (len--) - sender[len] = toupper(sender[len]); - } else { + if (sender) + string_upper(sender, sender); + else sender = cmm_default_sender; - } rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); if (rc < 0)