diff options
author | Dean Nelson <dcn@sgi.com> | 2008-04-22 15:50:17 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-22 18:08:55 -0400 |
commit | 2c2b94f93f4732c3b9703ce62627e6187e7d6128 (patch) | |
tree | 47fbdee38bc7cf0eec8c7c254a6c1c045ebbdb7e /drivers/misc/sgi-xp/xp_main.c | |
parent | 35190506b1a18eda7df24b285fdcd94dec7800ef (diff) |
[IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl
Addressed issues raised by scripts/checkpatch.pl. Removed unnecessary curly
braces. Eliminated uses of volatiles and use of kernel_thread() and daemonize().
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/misc/sgi-xp/xp_main.c')
-rw-r--r-- | drivers/misc/sgi-xp/xp_main.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c index bb9257642fcf..1fbf99bae963 100644 --- a/drivers/misc/sgi-xp/xp_main.c +++ b/drivers/misc/sgi-xp/xp_main.c | |||
@@ -23,15 +23,21 @@ | |||
23 | #include "xp.h" | 23 | #include "xp.h" |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Target of nofault PIO read. | 26 | * The export of xp_nofault_PIOR needs to happen here since it is defined |
27 | * in drivers/misc/sgi-xp/xp_nofault.S. The target of the nofault read is | ||
28 | * defined here. | ||
27 | */ | 29 | */ |
30 | EXPORT_SYMBOL_GPL(xp_nofault_PIOR); | ||
31 | |||
28 | u64 xp_nofault_PIOR_target; | 32 | u64 xp_nofault_PIOR_target; |
33 | EXPORT_SYMBOL_GPL(xp_nofault_PIOR_target); | ||
29 | 34 | ||
30 | /* | 35 | /* |
31 | * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level | 36 | * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level |
32 | * users of XPC. | 37 | * users of XPC. |
33 | */ | 38 | */ |
34 | struct xpc_registration xpc_registrations[XPC_NCHANNELS]; | 39 | struct xpc_registration xpc_registrations[XPC_NCHANNELS]; |
40 | EXPORT_SYMBOL_GPL(xpc_registrations); | ||
35 | 41 | ||
36 | /* | 42 | /* |
37 | * Initialize the XPC interface to indicate that XPC isn't loaded. | 43 | * Initialize the XPC interface to indicate that XPC isn't loaded. |
@@ -52,6 +58,7 @@ struct xpc_interface xpc_interface = { | |||
52 | (void (*)(partid_t, int, void *))xpc_notloaded, | 58 | (void (*)(partid_t, int, void *))xpc_notloaded, |
53 | (enum xpc_retval(*)(partid_t, void *))xpc_notloaded | 59 | (enum xpc_retval(*)(partid_t, void *))xpc_notloaded |
54 | }; | 60 | }; |
61 | EXPORT_SYMBOL_GPL(xpc_interface); | ||
55 | 62 | ||
56 | /* | 63 | /* |
57 | * XPC calls this when it (the XPC module) has been loaded. | 64 | * XPC calls this when it (the XPC module) has been loaded. |
@@ -74,6 +81,7 @@ xpc_set_interface(void (*connect) (int), | |||
74 | xpc_interface.received = received; | 81 | xpc_interface.received = received; |
75 | xpc_interface.partid_to_nasids = partid_to_nasids; | 82 | xpc_interface.partid_to_nasids = partid_to_nasids; |
76 | } | 83 | } |
84 | EXPORT_SYMBOL_GPL(xpc_set_interface); | ||
77 | 85 | ||
78 | /* | 86 | /* |
79 | * XPC calls this when it (the XPC module) is being unloaded. | 87 | * XPC calls this when it (the XPC module) is being unloaded. |
@@ -95,6 +103,7 @@ xpc_clear_interface(void) | |||
95 | xpc_interface.partid_to_nasids = (enum xpc_retval(*)(partid_t, void *)) | 103 | xpc_interface.partid_to_nasids = (enum xpc_retval(*)(partid_t, void *)) |
96 | xpc_notloaded; | 104 | xpc_notloaded; |
97 | } | 105 | } |
106 | EXPORT_SYMBOL_GPL(xpc_clear_interface); | ||
98 | 107 | ||
99 | /* | 108 | /* |
100 | * Register for automatic establishment of a channel connection whenever | 109 | * Register for automatic establishment of a channel connection whenever |
@@ -133,9 +142,8 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
133 | 142 | ||
134 | registration = &xpc_registrations[ch_number]; | 143 | registration = &xpc_registrations[ch_number]; |
135 | 144 | ||
136 | if (mutex_lock_interruptible(®istration->mutex) != 0) { | 145 | if (mutex_lock_interruptible(®istration->mutex) != 0) |
137 | return xpcInterrupted; | 146 | return xpcInterrupted; |
138 | } | ||
139 | 147 | ||
140 | /* if XPC_CHANNEL_REGISTERED(ch_number) */ | 148 | /* if XPC_CHANNEL_REGISTERED(ch_number) */ |
141 | if (registration->func != NULL) { | 149 | if (registration->func != NULL) { |
@@ -157,6 +165,7 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
157 | 165 | ||
158 | return xpcSuccess; | 166 | return xpcSuccess; |
159 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(xpc_connect); | ||
160 | 169 | ||
161 | /* | 170 | /* |
162 | * Remove the registration for automatic connection of the specified channel | 171 | * Remove the registration for automatic connection of the specified channel |
@@ -207,6 +216,7 @@ xpc_disconnect(int ch_number) | |||
207 | 216 | ||
208 | return; | 217 | return; |
209 | } | 218 | } |
219 | EXPORT_SYMBOL_GPL(xpc_disconnect); | ||
210 | 220 | ||
211 | int __init | 221 | int __init |
212 | xp_init(void) | 222 | xp_init(void) |
@@ -215,9 +225,8 @@ xp_init(void) | |||
215 | u64 func_addr = *(u64 *)xp_nofault_PIOR; | 225 | u64 func_addr = *(u64 *)xp_nofault_PIOR; |
216 | u64 err_func_addr = *(u64 *)xp_error_PIOR; | 226 | u64 err_func_addr = *(u64 *)xp_error_PIOR; |
217 | 227 | ||
218 | if (!ia64_platform_is("sn2")) { | 228 | if (!ia64_platform_is("sn2")) |
219 | return -ENODEV; | 229 | return -ENODEV; |
220 | } | ||
221 | 230 | ||
222 | /* | 231 | /* |
223 | * Register a nofault code region which performs a cross-partition | 232 | * Register a nofault code region which performs a cross-partition |
@@ -228,8 +237,9 @@ xp_init(void) | |||
228 | * least some CPUs on Shubs <= v1.2, which unfortunately we have to | 237 | * least some CPUs on Shubs <= v1.2, which unfortunately we have to |
229 | * work around). | 238 | * work around). |
230 | */ | 239 | */ |
231 | if ((ret = sn_register_nofault_code(func_addr, err_func_addr, | 240 | ret = sn_register_nofault_code(func_addr, err_func_addr, err_func_addr, |
232 | err_func_addr, 1, 1)) != 0) { | 241 | 1, 1); |
242 | if (ret != 0) { | ||
233 | printk(KERN_ERR "XP: can't register nofault code, error=%d\n", | 243 | printk(KERN_ERR "XP: can't register nofault code, error=%d\n", |
234 | ret); | 244 | ret); |
235 | } | 245 | } |
@@ -237,16 +247,14 @@ xp_init(void) | |||
237 | * Setup the nofault PIO read target. (There is no special reason why | 247 | * Setup the nofault PIO read target. (There is no special reason why |
238 | * SH_IPI_ACCESS was selected.) | 248 | * SH_IPI_ACCESS was selected.) |
239 | */ | 249 | */ |
240 | if (is_shub2()) { | 250 | if (is_shub2()) |
241 | xp_nofault_PIOR_target = SH2_IPI_ACCESS0; | 251 | xp_nofault_PIOR_target = SH2_IPI_ACCESS0; |
242 | } else { | 252 | else |
243 | xp_nofault_PIOR_target = SH1_IPI_ACCESS; | 253 | xp_nofault_PIOR_target = SH1_IPI_ACCESS; |
244 | } | ||
245 | 254 | ||
246 | /* initialize the connection registration mutex */ | 255 | /* initialize the connection registration mutex */ |
247 | for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { | 256 | for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) |
248 | mutex_init(&xpc_registrations[ch_number].mutex); | 257 | mutex_init(&xpc_registrations[ch_number].mutex); |
249 | } | ||
250 | 258 | ||
251 | return 0; | 259 | return 0; |
252 | } | 260 | } |
@@ -269,12 +277,3 @@ module_exit(xp_exit); | |||
269 | MODULE_AUTHOR("Silicon Graphics, Inc."); | 277 | MODULE_AUTHOR("Silicon Graphics, Inc."); |
270 | MODULE_DESCRIPTION("Cross Partition (XP) base"); | 278 | MODULE_DESCRIPTION("Cross Partition (XP) base"); |
271 | MODULE_LICENSE("GPL"); | 279 | MODULE_LICENSE("GPL"); |
272 | |||
273 | EXPORT_SYMBOL(xp_nofault_PIOR); | ||
274 | EXPORT_SYMBOL(xp_nofault_PIOR_target); | ||
275 | EXPORT_SYMBOL(xpc_registrations); | ||
276 | EXPORT_SYMBOL(xpc_interface); | ||
277 | EXPORT_SYMBOL(xpc_clear_interface); | ||
278 | EXPORT_SYMBOL(xpc_set_interface); | ||
279 | EXPORT_SYMBOL(xpc_connect); | ||
280 | EXPORT_SYMBOL(xpc_disconnect); | ||