aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2014-02-28 04:57:33 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2014-02-28 09:14:53 -0500
commit64b4f60f497058f1c6ba118a0260249ee5c091a6 (patch)
treeedf4bdf6b023178611bd0f4d0c01e7fed7d8dea7
parent288ac26cc2334e5e6ecad6416e9bf750691afd84 (diff)
arm64: remove return value form psci_init()
psci_init() is written to return err code if something goes wrong. However, the single user, setup_arch(), doesn't care about it. Moreover, every error path is supplied with a clear message which is enough for pleasant debugging. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/include/asm/psci.h2
-rw-r--r--arch/arm64/kernel/psci.c9
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm64/include/asm/psci.h b/arch/arm64/include/asm/psci.h
index e5312ea0ec1a..d15ab8b46336 100644
--- a/arch/arm64/include/asm/psci.h
+++ b/arch/arm64/include/asm/psci.h
@@ -14,6 +14,6 @@
14#ifndef __ASM_PSCI_H 14#ifndef __ASM_PSCI_H
15#define __ASM_PSCI_H 15#define __ASM_PSCI_H
16 16
17int psci_init(void); 17void psci_init(void);
18 18
19#endif /* __ASM_PSCI_H */ 19#endif /* __ASM_PSCI_H */
diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c
index 83ebee880d19..ea4828a4aa96 100644
--- a/arch/arm64/kernel/psci.c
+++ b/arch/arm64/kernel/psci.c
@@ -176,22 +176,20 @@ static const struct of_device_id psci_of_match[] __initconst = {
176 {}, 176 {},
177}; 177};
178 178
179int __init psci_init(void) 179void __init psci_init(void)
180{ 180{
181 struct device_node *np; 181 struct device_node *np;
182 const char *method; 182 const char *method;
183 u32 id; 183 u32 id;
184 int err = 0;
185 184
186 np = of_find_matching_node(NULL, psci_of_match); 185 np = of_find_matching_node(NULL, psci_of_match);
187 if (!np) 186 if (!np)
188 return -ENODEV; 187 return;
189 188
190 pr_info("probing function IDs from device-tree\n"); 189 pr_info("probing function IDs from device-tree\n");
191 190
192 if (of_property_read_string(np, "method", &method)) { 191 if (of_property_read_string(np, "method", &method)) {
193 pr_warning("missing \"method\" property\n"); 192 pr_warning("missing \"method\" property\n");
194 err = -ENXIO;
195 goto out_put_node; 193 goto out_put_node;
196 } 194 }
197 195
@@ -201,7 +199,6 @@ int __init psci_init(void)
201 invoke_psci_fn = __invoke_psci_fn_smc; 199 invoke_psci_fn = __invoke_psci_fn_smc;
202 } else { 200 } else {
203 pr_warning("invalid \"method\" property: %s\n", method); 201 pr_warning("invalid \"method\" property: %s\n", method);
204 err = -EINVAL;
205 goto out_put_node; 202 goto out_put_node;
206 } 203 }
207 204
@@ -227,7 +224,7 @@ int __init psci_init(void)
227 224
228out_put_node: 225out_put_node:
229 of_node_put(np); 226 of_node_put(np);
230 return err; 227 return;
231} 228}
232 229
233#ifdef CONFIG_SMP 230#ifdef CONFIG_SMP