diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2009-03-26 15:24:51 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 15:24:30 +0100 |
commit | 008d2d112cb8a743a87dfe41a67e11c0a4c73aa4 (patch) | |
tree | 1936f555595fe3b236137c2cf44a5230e7cc1af3 /arch/s390 | |
parent | 58ace9f2a8f1caa0303aa64079d3929be28a937a (diff) | |
download | lwn-008d2d112cb8a743a87dfe41a67e11c0a4c73aa4.tar.gz lwn-008d2d112cb8a743a87dfe41a67e11c0a4c73aa4.zip |
[S390] ipl: Improve checking logic and remove switch defaults.
A code analysis tool reported two warnings:
"The expression `ipl_info.type == IPL_TYPE_FCP' is true whenever evaluated."
and "Default is not possible". This patch improves the corresponding if
statement logic and removes the unnecessary switch defaults.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/ipl.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 505fec06e634..2b901fb8193b 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c @@ -966,7 +966,6 @@ static void reipl_run(struct shutdown_trigger *trigger) diag308(DIAG308_IPL, NULL); break; case REIPL_METHOD_FCP_DUMP: - default: break; } disabled_wait((unsigned long) __builtin_return_address(0)); @@ -1075,10 +1074,12 @@ static int __init reipl_fcp_init(void) { int rc; - if ((!diag308_set_works) && (ipl_info.type != IPL_TYPE_FCP)) - return 0; - if ((!diag308_set_works) && (ipl_info.type == IPL_TYPE_FCP)) - make_attrs_ro(reipl_fcp_attrs); + if (!diag308_set_works) { + if (ipl_info.type == IPL_TYPE_FCP) + make_attrs_ro(reipl_fcp_attrs); + else + return 0; + } reipl_block_fcp = (void *) get_zeroed_page(GFP_KERNEL); if (!reipl_block_fcp) @@ -1259,7 +1260,6 @@ static void dump_run(struct shutdown_trigger *trigger) diag308(DIAG308_DUMP, NULL); break; case DUMP_METHOD_NONE: - default: return; } printk(KERN_EMERG "Dump failed!\n"); @@ -1746,7 +1746,6 @@ void __init setup_ipl(void) sizeof(ipl_info.data.nss.name)); break; case IPL_TYPE_UNKNOWN: - default: /* We have no info to copy */ break; } |