summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2016-02-12 12:06:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 16:20:32 -0800
commit4420cfd3f51cf0ff21edd31fb59cdc05744b43d8 (patch)
tree2b49c2c79a411466dd0ce9ecb14b8d82b7cafc15 /drivers/staging/lustre/include
parentddbc66a5e5cd814fc5ee51adcd860389955ce021 (diff)
downloadop-kernel-dev-4420cfd3f51cf0ff21edd31fb59cdc05744b43d8.zip
op-kernel-dev-4420cfd3f51cf0ff21edd31fb59cdc05744b43d8.tar.gz
staging: lustre: format properly all comment blocks for LNet core
In several places in the LNet core comment blocks don't follow the linux kernel style. This patch cleans those problems up. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include')
-rw-r--r--drivers/staging/lustre/include/linux/lnet/api.h22
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-lnet.h9
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-types.h54
-rw-r--r--drivers/staging/lustre/include/linux/lnet/nidstr.h6
-rw-r--r--drivers/staging/lustre/include/linux/lnet/socklnd.h6
-rw-r--r--drivers/staging/lustre/include/linux/lnet/types.h47
6 files changed, 94 insertions, 50 deletions
diff --git a/drivers/staging/lustre/include/linux/lnet/api.h b/drivers/staging/lustre/include/linux/lnet/api.h
index fa5fad3..cb0d6b4 100644
--- a/drivers/staging/lustre/include/linux/lnet/api.h
+++ b/drivers/staging/lustre/include/linux/lnet/api.h
@@ -48,7 +48,8 @@
/** \defgroup lnet_init_fini Initialization and cleanup
* The LNet must be properly initialized before any LNet calls can be made.
- * @{ */
+ * @{
+ */
int LNetNIInit(lnet_pid_t requested_pid);
int LNetNIFini(void);
/** @} lnet_init_fini */
@@ -71,7 +72,8 @@ int LNetNIFini(void);
* it's an entry in the portals table of a process.
*
* \see LNetMEAttach
- * @{ */
+ * @{
+ */
int LNetGetId(unsigned int index, lnet_process_id_t *id);
int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
void LNetSnprintHandle(char *str, int str_len, lnet_handle_any_t handle);
@@ -89,7 +91,8 @@ void LNetSnprintHandle(char *str, int str_len, lnet_handle_any_t handle);
* incoming requests based on process ID or the match bits provided in the
* request. MEs can be dynamically inserted into a match list by LNetMEAttach()
* and LNetMEInsert(), and removed from its list by LNetMEUnlink().
- * @{ */
+ * @{
+ */
int LNetMEAttach(unsigned int portal,
lnet_process_id_t match_id_in,
__u64 match_bits_in,
@@ -120,7 +123,8 @@ int LNetMEUnlink(lnet_handle_me_t current_in);
* The LNet API provides two operations to create MDs: LNetMDAttach()
* and LNetMDBind(); one operation to unlink and release the resources
* associated with a MD: LNetMDUnlink().
- * @{ */
+ * @{
+ */
int LNetMDAttach(lnet_handle_me_t current_in,
lnet_md_t md_in,
lnet_unlink_t unlink_in,
@@ -154,7 +158,8 @@ int LNetMDUnlink(lnet_handle_md_t md_in);
* event from an EQ, and LNetEQWait() can be used to block a process until
* an EQ has at least one event. LNetEQPoll() can be used to test or wait
* on multiple EQs.
- * @{ */
+ * @{
+ */
int LNetEQAlloc(unsigned int count_in,
lnet_eq_handler_t handler,
lnet_handle_eq_t *handle_out);
@@ -172,7 +177,8 @@ int LNetEQPoll(lnet_handle_eq_t *eventqs_in,
*
* The LNet API provides two data movement operations: LNetPut()
* and LNetGet().
- * @{ */
+ * @{
+ */
int LNetPut(lnet_nid_t self,
lnet_handle_md_t md_in,
lnet_ack_req_t ack_req_in,
@@ -192,8 +198,8 @@ int LNetGet(lnet_nid_t self,
/** \defgroup lnet_misc Miscellaneous operations.
* Miscellaneous operations.
- * @{ */
-
+ * @{
+ */
int LNetSetLazyPortal(int portal);
int LNetClearLazyPortal(int portal);
int LNetCtl(unsigned int cmd, void *arg);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 40acddd..c3bf5e8 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -79,7 +79,8 @@ static inline int lnet_md_exhausted(lnet_libmd_t *md)
static inline int lnet_md_unlinkable(lnet_libmd_t *md)
{
- /* Should unlink md when its refcount is 0 and either:
+ /*
+ * Should unlink md when its refcount is 0 and either:
* - md has been flagged for deletion (by auto unlink or
* LNetM[DE]Unlink, in the latter case md may not be exhausted).
* - auto unlink is on and md is exhausted.
@@ -102,8 +103,10 @@ lnet_cpt_of_cookie(__u64 cookie)
{
unsigned int cpt = (cookie >> LNET_COOKIE_TYPE_BITS) & LNET_CPT_MASK;
- /* LNET_CPT_NUMBER doesn't have to be power2, which means we can
- * get illegal cpt from it's invalid cookie */
+ /*
+ * LNET_CPT_NUMBER doesn't have to be power2, which means we can
+ * get illegal cpt from it's invalid cookie
+ */
return cpt < LNET_CPT_NUMBER ? cpt : cpt % LNET_CPT_NUMBER;
}
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 3bb9468..55d9d43 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -85,8 +85,7 @@ typedef struct lnet_msg {
unsigned int msg_receiving:1; /* being received */
unsigned int msg_txcredit:1; /* taken an NI send credit */
unsigned int msg_peertxcredit:1; /* taken a peer send credit */
- unsigned int msg_rtrcredit:1; /* taken a global
- router credit */
+ unsigned int msg_rtrcredit:1; /* taken a global router credit */
unsigned int msg_peerrtrcredit:1; /* taken a peer router credit */
unsigned int msg_onactivelist:1; /* on the activelist */
@@ -190,7 +189,8 @@ typedef struct lnet_lnd {
void (*lnd_shutdown)(struct lnet_ni *ni);
int (*lnd_ctl)(struct lnet_ni *ni, unsigned int cmd, void *arg);
- /* In data movement APIs below, payload buffers are described as a set
+ /*
+ * In data movement APIs below, payload buffers are described as a set
* of 'niov' fragments which are...
* EITHER
* in virtual memory (struct iovec *iov != NULL)
@@ -201,30 +201,36 @@ typedef struct lnet_lnd {
* fragments to start from
*/
- /* Start sending a preformatted message. 'private' is NULL for PUT and
+ /*
+ * Start sending a preformatted message. 'private' is NULL for PUT and
* GET messages; otherwise this is a response to an incoming message
* and 'private' is the 'private' passed to lnet_parse(). Return
* non-zero for immediate failure, otherwise complete later with
- * lnet_finalize() */
+ * lnet_finalize()
+ */
int (*lnd_send)(struct lnet_ni *ni, void *private, lnet_msg_t *msg);
- /* Start receiving 'mlen' bytes of payload data, skipping the following
+ /*
+ * Start receiving 'mlen' bytes of payload data, skipping the following
* 'rlen' - 'mlen' bytes. 'private' is the 'private' passed to
* lnet_parse(). Return non-zero for immediate failure, otherwise
* complete later with lnet_finalize(). This also gives back a receive
- * credit if the LND does flow control. */
+ * credit if the LND does flow control.
+ */
int (*lnd_recv)(struct lnet_ni *ni, void *private, lnet_msg_t *msg,
int delayed, unsigned int niov,
struct kvec *iov, lnet_kiov_t *kiov,
unsigned int offset, unsigned int mlen,
unsigned int rlen);
- /* lnet_parse() has had to delay processing of this message
+ /*
+ * lnet_parse() has had to delay processing of this message
* (e.g. waiting for a forwarding buffer or send credits). Give the
* LND a chance to free urgently needed resources. If called, return 0
* for success and do NOT give back a receive credit; that has to wait
* until lnd_recv() gets called. On failure return < 0 and
- * release resources; lnd_recv() will not be called. */
+ * release resources; lnd_recv() will not be called.
+ */
int (*lnd_eager_recv)(struct lnet_ni *ni, void *private,
lnet_msg_t *msg, void **new_privatep);
@@ -272,8 +278,10 @@ typedef struct lnet_ni {
#define LNET_PROTO_PING_MATCHBITS 0x8000000000000000LL
-/* NB: value of these features equal to LNET_PROTO_PING_VERSION_x
- * of old LNet, so there shouldn't be any compatibility issue */
+/*
+ * NB: value of these features equal to LNET_PROTO_PING_VERSION_x
+ * of old LNet, so there shouldn't be any compatibility issue
+ */
#define LNET_PING_FEAT_INVAL (0) /* no feature */
#define LNET_PING_FEAT_BASE (1 << 0) /* just a ping */
#define LNET_PING_FEAT_NI_STATUS (1 << 1) /* return NI status */
@@ -347,8 +355,10 @@ struct lnet_peer_table {
struct list_head *pt_hash; /* NID->peer hash */
};
-/* peer aliveness is enabled only on routers for peers in a network where the
- * lnet_ni_t::ni_peertimeout has been set to a positive value */
+/*
+ * peer aliveness is enabled only on routers for peers in a network where the
+ * lnet_ni_t::ni_peertimeout has been set to a positive value
+ */
#define lnet_peer_aliveness_enabled(lp) (the_lnet.ln_routing != 0 && \
(lp)->lp_ni->ni_peertimeout > 0)
@@ -433,12 +443,16 @@ struct lnet_match_info {
#define LNET_MT_HASH_BITS 8
#define LNET_MT_HASH_SIZE (1 << LNET_MT_HASH_BITS)
#define LNET_MT_HASH_MASK (LNET_MT_HASH_SIZE - 1)
-/* we allocate (LNET_MT_HASH_SIZE + 1) entries for lnet_match_table::mt_hash,
- * the last entry is reserved for MEs with ignore-bits */
+/*
+ * we allocate (LNET_MT_HASH_SIZE + 1) entries for lnet_match_table::mt_hash,
+ * the last entry is reserved for MEs with ignore-bits
+ */
#define LNET_MT_HASH_IGNORE LNET_MT_HASH_SIZE
-/* __u64 has 2^6 bits, so need 2^(LNET_MT_HASH_BITS - LNET_MT_BITS_U64) which
+/*
+ * __u64 has 2^6 bits, so need 2^(LNET_MT_HASH_BITS - LNET_MT_BITS_U64) which
* is 4 __u64s as bit-map, and add an extra __u64 (only use one bit) for the
- * ME-list with ignore-bits, which is mtable::mt_hash[LNET_MT_HASH_IGNORE] */
+ * ME-list with ignore-bits, which is mtable::mt_hash[LNET_MT_HASH_IGNORE]
+ */
#define LNET_MT_BITS_U64 6 /* 2^6 bits */
#define LNET_MT_EXHAUSTED_BITS (LNET_MT_HASH_BITS - LNET_MT_BITS_U64)
#define LNET_MT_EXHAUSTED_BMAP ((1 << LNET_MT_EXHAUSTED_BITS) + 1)
@@ -448,8 +462,10 @@ struct lnet_match_table {
/* reserved for upcoming patches, CPU partition ID */
unsigned int mt_cpt;
unsigned int mt_portal; /* portal index */
- /* match table is set as "enabled" if there's non-exhausted MD
- * attached on mt_mhash, it's only valid for wildcard portal */
+ /*
+ * match table is set as "enabled" if there's non-exhausted MD
+ * attached on mt_mhash, it's only valid for wildcard portal
+ */
unsigned int mt_enabled;
/* bitmap to flag whether MEs on mt_hash are exhausted or not */
__u64 mt_exhausted[LNET_MT_EXHAUSTED_BMAP];
diff --git a/drivers/staging/lustre/include/linux/lnet/nidstr.h b/drivers/staging/lustre/include/linux/lnet/nidstr.h
index 4fc9ddc..9a705e1 100644
--- a/drivers/staging/lustre/include/linux/lnet/nidstr.h
+++ b/drivers/staging/lustre/include/linux/lnet/nidstr.h
@@ -34,8 +34,10 @@
* Lustre Network Driver types.
*/
enum {
- /* Only add to these values (i.e. don't ever change or redefine them):
- * network addresses depend on them... */
+ /*
+ * Only add to these values (i.e. don't ever change or redefine them):
+ * network addresses depend on them...
+ */
QSWLND = 1,
SOCKLND = 2,
GMLND = 3,
diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index 599c9f6..3df5065 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -91,8 +91,10 @@ socklnd_init_msg(ksock_msg_t *msg, int type)
#define KSOCK_MSG_NOOP 0xC0 /* ksm_u empty */
#define KSOCK_MSG_LNET 0xC1 /* lnet msg */
-/* We need to know this number to parse hello msg from ksocklnd in
- * other LND (usocklnd, for example) */
+/*
+ * We need to know this number to parse hello msg from ksocklnd in
+ * other LND (usocklnd, for example)
+ */
#define KSOCK_PROTO_V2 2
#define KSOCK_PROTO_V3 3
diff --git a/drivers/staging/lustre/include/linux/lnet/types.h b/drivers/staging/lustre/include/linux/lnet/types.h
index 1163018..81d01f1 100644
--- a/drivers/staging/lustre/include/linux/lnet/types.h
+++ b/drivers/staging/lustre/include/linux/lnet/types.h
@@ -36,10 +36,12 @@
#include <linux/types.h>
/** \addtogroup lnet
- * @{ */
+ * @{
+ */
/** \addtogroup lnet_addr
- * @{ */
+ * @{
+ */
/** Portal reserved for LNet's own use.
* \see lustre/include/lustre/lustre_idl.h for Lustre portal assignments.
@@ -116,10 +118,12 @@ typedef struct {
lnet_pid_t pid;
} WIRE_ATTR lnet_process_id_packed_t;
-/* The wire handle's interface cookie only matches one network interface in
+/*
+ * The wire handle's interface cookie only matches one network interface in
* one epoch (i.e. new cookie when the interface restarts or the node
* reboots). The object cookie only matches one object on that interface
- * during that object's lifetime (i.e. no cookie re-use). */
+ * during that object's lifetime (i.e. no cookie re-use).
+ */
typedef struct {
__u64 wh_interface_cookie;
__u64 wh_object_cookie;
@@ -133,10 +137,12 @@ typedef enum {
LNET_MSG_HELLO,
} lnet_msg_type_t;
-/* The variant fields of the portals message header are aligned on an 8
+/*
+ * The variant fields of the portals message header are aligned on an 8
* byte boundary in the message header. Note that all types used in these
* wire structs MUST be fixed size and the smaller types are placed at the
- * end. */
+ * end.
+ */
typedef struct lnet_ack {
lnet_handle_wire_t dst_wmd;
__u64 match_bits;
@@ -185,7 +191,8 @@ typedef struct {
} msg;
} WIRE_ATTR lnet_hdr_t;
-/* A HELLO message contains a magic number and protocol version
+/*
+ * A HELLO message contains a magic number and protocol version
* code in the header's dest_nid, the peer's NID in the src_nid, and
* LNET_MSG_HELLO in the type field. All other common fields are zero
* (including payload_size; i.e. no payload).
@@ -208,8 +215,10 @@ typedef struct {
#define LNET_PROTO_PING_MAGIC 0x70696E67 /* 'ping' */
/* Placeholder for a future "unified" protocol across all LNDs */
-/* Current LNDs that receive a request with this magic will respond with a
- * "stub" reply using their current protocol */
+/*
+ * Current LNDs that receive a request with this magic will respond with a
+ * "stub" reply using their current protocol
+ */
#define LNET_PROTO_MAGIC 0x45726963 /* ! */
#define LNET_PROTO_TCP_VERSION_MAJOR 1
@@ -258,7 +267,7 @@ typedef struct lnet_counters {
#define LNET_MAX_INTERFACES 16
-/*
+/**
* Objects maintained by the LNet are accessed through handles. Handle types
* have names of the form lnet_handle_xx_t, where xx is one of the two letter
* object type codes ('eq' for event queue, 'md' for memory descriptor, and
@@ -318,7 +327,8 @@ typedef struct {
/** @} lnet_addr */
/** \addtogroup lnet_me
- * @{ */
+ * @{
+ */
/**
* Specifies whether the match entry or memory descriptor should be unlinked
@@ -348,7 +358,8 @@ typedef enum {
/** @} lnet_me */
/** \addtogroup lnet_md
- * @{ */
+ * @{
+ */
/**
* Defines the visible parts of a memory descriptor. Values of this type
@@ -450,9 +461,11 @@ typedef struct {
lnet_handle_eq_t eq_handle;
} lnet_md_t;
-/* Max Transfer Unit (minimum supported everywhere).
+/*
+ * Max Transfer Unit (minimum supported everywhere).
* CAVEAT EMPTOR, with multinet (i.e. routers forwarding between networks)
- * these limits are system wide and not interface-local. */
+ * these limits are system wide and not interface-local.
+ */
#define LNET_MTU_BITS 20
#define LNET_MTU (1 << LNET_MTU_BITS)
@@ -506,7 +519,8 @@ typedef struct {
/** @} lnet_md */
/** \addtogroup lnet_eq
- * @{ */
+ * @{
+ */
/**
* Six types of events can be logged in an event queue.
@@ -640,7 +654,8 @@ typedef void (*lnet_eq_handler_t)(lnet_event_t *event);
/** @} lnet_eq */
/** \addtogroup lnet_data
- * @{ */
+ * @{
+ */
/**
* Specify whether an acknowledgment should be sent by target when the PUT
OpenPOWER on IntegriCloud