From 2e85ba510ede4aea1b150493407ae911e8ea5051 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 9 Aug 2010 18:12:55 +0200 Subject: [S390] cmm: add missing __init/__exit annotations Add missing __init and __exit annoations for module init and exit functions. This will save us huge amounts of memory... sort of. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/mm/cmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/s390/mm') diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index eb6a2ef5f82..4bddf8d3a15 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -427,7 +427,7 @@ static struct notifier_block cmm_power_notifier = { .notifier_call = cmm_power_event, }; -static int cmm_init(void) +static int __init cmm_init(void) { int rc = -ENOMEM; @@ -467,7 +467,7 @@ out_sysctl: } module_init(cmm_init); -static void cmm_exit(void) +static void __exit cmm_exit(void) { unregister_sysctl_table(cmm_sysctl_header); #ifdef CONFIG_CMM_IUCV -- cgit v1.2.3-70-g09d2 From 41b42876772bb8c1cbd7e68d384791f97a5fd0d6 Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Mon, 9 Aug 2010 18:12:56 +0200 Subject: [S390] cmm, smsgiucv_app: convert sender to uppercase The sender kernel parameter contains a z/VM user ID where alphabetic characters must be specified in uppercase. Allow users to specify lowercase characters and convert the sender string to uppercase at module initialization. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky --- arch/s390/mm/cmm.c | 7 +++++++ drivers/s390/net/smsgiucv_app.c | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'arch/s390/mm') diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 4bddf8d3a15..a9550dca3e4 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -435,6 +435,13 @@ static int __init cmm_init(void) if (!cmm_sysctl_header) 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]); + } + rc = smsg_register_callback(SMSG_PREFIX, cmm_smsg_target); if (rc < 0) goto out_smsg; diff --git a/drivers/s390/net/smsgiucv_app.c b/drivers/s390/net/smsgiucv_app.c index 13768879020..4d2ea400042 100644 --- a/drivers/s390/net/smsgiucv_app.c +++ b/drivers/s390/net/smsgiucv_app.c @@ -180,6 +180,13 @@ static int __init smsgiucv_app_init(void) goto fail_put_driver; } + /* convert sender to uppercase characters */ + if (sender) { + int len = strlen(sender); + while (len--) + sender[len] = toupper(sender[len]); + } + /* register with the smsgiucv device driver */ rc = smsg_register_callback(SMSG_PREFIX, smsg_app_callback); if (rc) { -- cgit v1.2.3-70-g09d2