diff options
| author | Dean Nelson <dcn@sgi.com> | 2008-04-22 14:48:01 -0500 | 
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2008-04-22 15:08:29 -0700 | 
| commit | 4a3ad2ddc0b920cd3ead84b0c67599be02d689ca (patch) | |
| tree | 244e6cc7fefcf5c8c5d8245c5ac9923835a7e366 /drivers/misc/sgi-xp/xp_main.c | |
| parent | 45d9ca492e4bd1522d1b5bd125c2908f1cee3d4a (diff) | |
| download | olio-linux-3.10-4a3ad2ddc0b920cd3ead84b0c67599be02d689ca.tar.xz olio-linux-3.10-4a3ad2ddc0b920cd3ead84b0c67599be02d689ca.zip  | |
[IA64] run some drivers/misc/sgi-xp through scripts/Lindent
Ran patches through scripts/Lindent (part 1).
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 | 98 | 
1 files changed, 44 insertions, 54 deletions
diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c index 5f9f9c2e929..bb9257642fc 100644 --- a/drivers/misc/sgi-xp/xp_main.c +++ b/drivers/misc/sgi-xp/xp_main.c @@ -6,7 +6,6 @@   * Copyright (c) 2004-2008 Silicon Graphics, Inc.  All Rights Reserved.   */ -  /*   * Cross Partition (XP) base.   * @@ -15,7 +14,6 @@   *   */ -  #include <linux/kernel.h>  #include <linux/interrupt.h>  #include <linux/module.h> @@ -24,49 +22,49 @@  #include <asm/sn/sn_sal.h>  #include "xp.h" -  /*   * Target of nofault PIO read.   */  u64 xp_nofault_PIOR_target; -  /*   * xpc_registrations[] keeps track of xpc_connect()'s done by the kernel-level   * users of XPC.   */  struct xpc_registration xpc_registrations[XPC_NCHANNELS]; -  /*   * Initialize the XPC interface to indicate that XPC isn't loaded.   */ -static enum xpc_retval xpc_notloaded(void) { return xpcNotLoaded; } +static enum xpc_retval +xpc_notloaded(void) +{ +	return xpcNotLoaded; +}  struct xpc_interface xpc_interface = { -	(void (*)(int)) xpc_notloaded, -	(void (*)(int)) xpc_notloaded, -	(enum xpc_retval (*)(partid_t, int, u32, void **)) xpc_notloaded, -	(enum xpc_retval (*)(partid_t, int, void *)) xpc_notloaded, -	(enum xpc_retval (*)(partid_t, int, void *, xpc_notify_func, void *)) -							xpc_notloaded, -	(void (*)(partid_t, int, void *)) xpc_notloaded, -	(enum xpc_retval (*)(partid_t, void *)) xpc_notloaded +	(void (*)(int))xpc_notloaded, +	(void (*)(int))xpc_notloaded, +	(enum xpc_retval(*)(partid_t, int, u32, void **))xpc_notloaded, +	(enum xpc_retval(*)(partid_t, int, void *))xpc_notloaded, +	(enum xpc_retval(*)(partid_t, int, void *, xpc_notify_func, void *)) +	    xpc_notloaded, +	(void (*)(partid_t, int, void *))xpc_notloaded, +	(enum xpc_retval(*)(partid_t, void *))xpc_notloaded  }; -  /*   * XPC calls this when it (the XPC module) has been loaded.   */  void -xpc_set_interface(void (*connect)(int), -		void (*disconnect)(int), -		enum xpc_retval (*allocate)(partid_t, int, u32, void **), -		enum xpc_retval (*send)(partid_t, int, void *), -		enum xpc_retval (*send_notify)(partid_t, int, void *, -						xpc_notify_func, void *), -		void (*received)(partid_t, int, void *), -		enum xpc_retval (*partid_to_nasids)(partid_t, void *)) +xpc_set_interface(void (*connect) (int), +		  void (*disconnect) (int), +		  enum xpc_retval (*allocate) (partid_t, int, u32, void **), +		  enum xpc_retval (*send) (partid_t, int, void *), +		  enum xpc_retval (*send_notify) (partid_t, int, void *, +						  xpc_notify_func, void *), +		  void (*received) (partid_t, int, void *), +		  enum xpc_retval (*partid_to_nasids) (partid_t, void *))  {  	xpc_interface.connect = connect;  	xpc_interface.disconnect = disconnect; @@ -77,28 +75,27 @@ xpc_set_interface(void (*connect)(int),  	xpc_interface.partid_to_nasids = partid_to_nasids;  } -  /*   * XPC calls this when it (the XPC module) is being unloaded.   */  void  xpc_clear_interface(void)  { -	xpc_interface.connect = (void (*)(int)) xpc_notloaded; -	xpc_interface.disconnect = (void (*)(int)) xpc_notloaded; -	xpc_interface.allocate = (enum xpc_retval (*)(partid_t, int, u32, -					void **)) xpc_notloaded; -	xpc_interface.send = (enum xpc_retval (*)(partid_t, int, void *)) -					xpc_notloaded; -	xpc_interface.send_notify = (enum xpc_retval (*)(partid_t, int, void *, -				    xpc_notify_func, void *)) xpc_notloaded; +	xpc_interface.connect = (void (*)(int))xpc_notloaded; +	xpc_interface.disconnect = (void (*)(int))xpc_notloaded; +	xpc_interface.allocate = (enum xpc_retval(*)(partid_t, int, u32, +						     void **))xpc_notloaded; +	xpc_interface.send = (enum xpc_retval(*)(partid_t, int, void *)) +	    xpc_notloaded; +	xpc_interface.send_notify = (enum xpc_retval(*)(partid_t, int, void *, +							xpc_notify_func, +							void *))xpc_notloaded;  	xpc_interface.received = (void (*)(partid_t, int, void *)) -					xpc_notloaded; -	xpc_interface.partid_to_nasids = (enum xpc_retval (*)(partid_t, void *)) -					xpc_notloaded; +	    xpc_notloaded; +	xpc_interface.partid_to_nasids = (enum xpc_retval(*)(partid_t, void *)) +	    xpc_notloaded;  } -  /*   * Register for automatic establishment of a channel connection whenever   * a partition comes up. @@ -125,11 +122,10 @@ xpc_clear_interface(void)   */  enum xpc_retval  xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, -		u16 nentries, u32 assigned_limit, u32 idle_limit) +	    u16 nentries, u32 assigned_limit, u32 idle_limit)  {  	struct xpc_registration *registration; -  	DBUG_ON(ch_number < 0 || ch_number >= XPC_NCHANNELS);  	DBUG_ON(payload_size == 0 || nentries == 0);  	DBUG_ON(func == NULL); @@ -162,7 +158,6 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size,  	return xpcSuccess;  } -  /*   * Remove the registration for automatic connection of the specified channel   * when a partition comes up. @@ -181,7 +176,6 @@ xpc_disconnect(int ch_number)  {  	struct xpc_registration *registration; -  	DBUG_ON(ch_number < 0 || ch_number >= XPC_NCHANNELS);  	registration = &xpc_registrations[ch_number]; @@ -214,14 +208,12 @@ xpc_disconnect(int ch_number)  	return;  } -  int __init  xp_init(void)  {  	int ret, ch_number; -	u64 func_addr = *(u64 *) xp_nofault_PIOR; -	u64 err_func_addr = *(u64 *) xp_error_PIOR; - +	u64 func_addr = *(u64 *)xp_nofault_PIOR; +	u64 err_func_addr = *(u64 *)xp_error_PIOR;  	if (!ia64_platform_is("sn2")) {  		return -ENODEV; @@ -237,9 +229,9 @@ xp_init(void)  	 * work around).  	 */  	if ((ret = sn_register_nofault_code(func_addr, err_func_addr, -						err_func_addr, 1, 1)) != 0) { +					    err_func_addr, 1, 1)) != 0) {  		printk(KERN_ERR "XP: can't register nofault code, error=%d\n", -			ret); +		       ret);  	}  	/*  	 * Setup the nofault PIO read target. (There is no special reason why @@ -258,22 +250,21 @@ xp_init(void)  	return 0;  } -module_init(xp_init); +module_init(xp_init);  void __exit  xp_exit(void)  { -	u64 func_addr = *(u64 *) xp_nofault_PIOR; -	u64 err_func_addr = *(u64 *) xp_error_PIOR; - +	u64 func_addr = *(u64 *)xp_nofault_PIOR; +	u64 err_func_addr = *(u64 *)xp_error_PIOR;  	/* unregister the PIO read nofault code region */ -	(void) sn_register_nofault_code(func_addr, err_func_addr, -					err_func_addr, 1, 0); +	(void)sn_register_nofault_code(func_addr, err_func_addr, +				       err_func_addr, 1, 0);  } -module_exit(xp_exit); +module_exit(xp_exit);  MODULE_AUTHOR("Silicon Graphics, Inc.");  MODULE_DESCRIPTION("Cross Partition (XP) base"); @@ -287,4 +278,3 @@ EXPORT_SYMBOL(xpc_clear_interface);  EXPORT_SYMBOL(xpc_set_interface);  EXPORT_SYMBOL(xpc_connect);  EXPORT_SYMBOL(xpc_disconnect); -  |