[openib-general] [PATCH][SDP][15/33] Fix comment style in sdp_link.c

Tom Duffy Tom.Duffy at Sun.COM
Thu Feb 17 14:11:03 PST 2005


Signed-off-by: Tom Duffy <tduffy at sun.com>

--- drivers/infiniband/ulp/sdp-orig/sdp_link.c	2005-02-10 18:42:56.318026000 -0800
+++ drivers/infiniband/ulp/sdp/sdp_link.c	2005-02-17 11:03:42.673005000 -0800
@@ -1,25 +1,37 @@
 /*
-  This software is available to you under a choice of one of two
-  licenses.  You may choose to be licensed under the terms of the GNU
-  General Public License (GPL) Version 2, available at
-  <http://www.fsf.org/copyleft/gpl.html>, or the OpenIB.org BSD
-  license, available in the LICENSE.TXT file accompanying this
-  software.  These details are also available at
-  <http://openib.org/license.html>.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-  SOFTWARE.
-
-  Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
 
-  $Id: sdp_link.c,v 1.26 2004/03/29 03:13:18 roland Exp $
-*/
 #include "ipoib.h"
 #include "sdp_main.h"
 #include "sdp_link.h"
@@ -51,8 +63,9 @@ static u64 _path_lookup_id = 0;
  */
 void _sdp_link_path_lookup(void *data);
 
-/* ========================================================================= */
-/*.._sdp_link_path_complete -- generate a path record completion for user */
+/*
+ * _sdp_link_path_complete - generate a path record completion for user
+ */
 static void _sdp_link_path_complete(u64 id,
 				    int status,
 				    struct sdp_path_info *info,
@@ -82,8 +95,9 @@ static void _sdp_link_path_complete(u64 
 	return;
 } /* _sdp_link_path_complete */
 
-/* ========================================================================= */
-/*.._sdp_path_wait_add -- add a wait entry into the wait list for a path  */
+/*
+ * _sdp_path_wait_add - add a wait entry into the wait list for a path
+ */
 static void _sdp_path_wait_add(struct sdp_path_info *info,
 			       struct sdp_path_wait *wait)
 {
@@ -100,8 +114,9 @@ static void _sdp_path_wait_add(struct sd
 	return;
 } /* _sdp_path_wait_add */
 
-/* ========================================================================= */
-/*.._sdp_path_wait_destroy -- destroy an entry for a wait element */
+/*
+ * _sdp_path_wait_destroy - destroy an entry for a wait element
+ */
 static void _sdp_path_wait_destroy(struct sdp_path_wait *wait)
 {
 	/*
@@ -123,8 +138,10 @@ static void _sdp_path_wait_destroy(struc
 
 	return;
 } /* _sdp_path_wait_destroy */
-/* ========================================================================= */
-/*.._sdp_path_wait_complete -- complete an entry for a wait element */
+
+/*
+ * _sdp_path_wait_complete - complete an entry for a wait element
+ */
 static void _sdp_path_wait_complete(struct sdp_path_wait *wait,
 				   struct sdp_path_info *info,
 				   int status)
@@ -140,10 +157,10 @@ static void _sdp_path_wait_complete(stru
 	return;
 } /* _sdp_path_wait_complete */
 
-/* ========================================================================= */
-/*.._sdp_path_info_lookup -- lookup a path record entry */
-static struct sdp_path_info *_sdp_path_info_lookup(u32 dst_ip,
-						   int dev_if)
+/*
+ * _sdp_path_info_lookup - lookup a path record entry
+ */
+static struct sdp_path_info *_sdp_path_info_lookup(u32 dst_ip, int dev_if)
 {
 	struct sdp_path_info *info;
 
@@ -159,10 +176,10 @@ static struct sdp_path_info *_sdp_path_i
 	return info;
 } /* _sdp_path_info_lookup */
 
-/* ========================================================================= */
-/*.._sdp_path_info_create -- create an entry for a path record element */
-static struct sdp_path_info *_sdp_path_info_create(u32 dst_ip,
-						   int dev_if)
+/*
+ * _sdp_path_info_create - create an entry for a path record element
+ */
+static struct sdp_path_info *_sdp_path_info_create(u32 dst_ip, int dev_if)
 {
 	struct sdp_path_info *info;
 
@@ -194,8 +211,9 @@ static struct sdp_path_info *_sdp_path_i
 	return info;
 } /* _sdp_path_info_create */
 
-/* ========================================================================= */
-/*.._sdp_path_info_destroy -- destroy an entry for a path record element */
+/*
+ * _sdp_path_info_destroy - destroy an entry for a path record element
+ */
 static void _sdp_path_info_destroy(struct sdp_path_info *info, int status)
 {
 	struct sdp_path_wait *wait;
@@ -225,8 +243,9 @@ static void _sdp_path_info_destroy(struc
 	return;
 } /* _sdp_path_info_destroy */
 
-/* ========================================================================= */
-/*.._sdp_link_path_rec_done -- path record completion function. */
+/*
+ * _sdp_link_path_rec_done - path record completion function
+ */
 static void _sdp_link_path_rec_done(int status,
 				    struct ib_sa_path_rec *resp,
 				    void *context)
@@ -299,8 +318,9 @@ static void _sdp_link_path_rec_done(int 
 	return;
 } /* _sdp_link_path_rec_done */
 
-/* ========================================================================= */
-/*.._sdp_link_path_rec_get -- resolve GIDs to a path record. */
+/*
+ * _sdp_link_path_rec_get - resolve GIDs to a path record
+ */
 int _sdp_link_path_rec_get(struct sdp_path_info *info)
 {
 	int result;
@@ -341,8 +361,9 @@ int _sdp_link_path_rec_get(struct sdp_pa
 	return result;
 } /* _sdp_link_path_rec_get */
 
-/* ========================================================================= */
-/*.._sdp_link_path_lookup -- resolve an ip address to a path record */
+/*
+ * _sdp_link_path_lookup - resolve an ip address to a path record
+ */
 void _sdp_link_path_lookup(void *data)
 {
 	struct sdp_path_info *info = data;
@@ -559,11 +580,13 @@ error:
 	return;
 } /* _sdp_link_path_lookup */
 
-/* --------------------------------------------------------------------- */
-/* Public functions                                                      */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*..sdp_link_path_lookup -- resolve an ip address to a path record */
+/*
+ * Public functions
+ */
+
+/*
+ * sdp_link_path_lookup - resolve an ip address to a path record
+ */
 int sdp_link_path_lookup(u32 dst_addr,      /* NBO */
 			 u32 src_addr,      /* NBO */
 			 int bound_dev_if,  /* socket option */
@@ -636,11 +659,13 @@ error:
 	return result;
 } /* sdp_link_path_lookup */
 
-/* --------------------------------------------------------------------- */
-/* timers                                                                */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_link_sweep -- periodic path information cleanup function */
+/*
+ * timers
+ */
+
+/*
+ * _sdp_link_sweep - periodic path information cleanup function
+ */
 static void _sdp_link_sweep(void *data)
 {
 	struct sdp_path_info *info;
@@ -669,11 +694,14 @@ static void _sdp_link_sweep(void *data)
 	queue_delayed_work(_link_wq, &_link_timer, SDP_LINK_SWEEP_INTERVAL);
 	return;
 } /* _sdp_link_sweep */
-/* --------------------------------------------------------------------- */
-/* Arp packet reception for completions                                  */
-/* --------------------------------------------------------------------- */
-/* ========================================================================= */
-/*.._sdp_link_arp_work -- handle IB REQUEST/REPLY ARP packets. */
+
+/*
+ * Arp packet reception for completions
+ */
+
+/*
+ * _sdp_link_arp_work - handle IB REQUEST/REPLY ARP packets
+ */
 static void _sdp_link_arp_work(void *data)
 {
 	struct sdp_work *work = (struct sdp_work *)data;
@@ -729,8 +757,9 @@ done:
 	return;
 } /* _sdp_link_arp_work */
 
-/* ========================================================================= */
-/*.._sdp_link_arp_recv -- receive all ARP packets. */
+/*
+ * _sdp_link_arp_recv - receive all ARP packets
+ */
 static int _sdp_link_arp_recv(struct sk_buff *skb,
 			      struct net_device *dev,
 			      struct packet_type *pt)
@@ -764,23 +793,20 @@ done:
 	kfree_skb(skb);
 	return 0;
 } /* _sdp_link_arp_recv */
-/* --------------------------------------------------------------------- */
-/*                                                                       */
-/* primary initialization/cleanup functions                              */
-/*                                                                       */
-/* --------------------------------------------------------------------- */
+
+/*
+ * primary initialization/cleanup functions
+ */
 static struct packet_type _sdp_arp_type = {
 	.type           = __constant_htons(ETH_P_ARP),
 	.func           = _sdp_link_arp_recv,
 	.af_packet_priv = (void*) 1, /* understand shared skbs */
 };
 
-/* ========================================================================= */
-/*..sdp_link_addr_init -- initialize the link address retrival code. */
-int sdp_link_addr_init
-(
- void
-)
+/*
+ * sdp_link_addr_init - initialize the link address retrival code
+ */
+int sdp_link_addr_init(void)
 {
 	int result;
 
@@ -849,12 +875,10 @@ error_path:
 	return result;
 } /* sdp_link_addr_init */
 
-/* ========================================================================= */
-/*..sdp_link_addr_cleanup -- cleanup the link address retrival code. */
-int sdp_link_addr_cleanup
-(
- void
-)
+/*
+ * sdp_link_addr_cleanup - cleanup the link address retrival code
+ */
+int sdp_link_addr_cleanup(void)
 {
 	struct sdp_path_info *info;
 
@@ -890,17 +914,3 @@ int sdp_link_addr_cleanup
 
 	return 0;
 } /* sdp_link_addr_cleanup */
-
-
-
-
-
-
-
-
-
-
-
-
-
-




More information about the general mailing list