This series fixes a few style issues in lustre. All where picked up
by checkpatch.
v2 Changes:
- Fixed typo in patch subject s/luster/lustre/
Craig Inches (4):
Staging: Lustre Clean up line over 80Char in lib-lnet.h
Staging: Lustre Fix up multiple Block Comments in lib-types.h
Staging: Lustre Fixing multiline block comments in lnetst.h
Staging: Lustre Fix block statement style issue
.../staging/lustre/include/linux/lnet/lib-lnet.h | 3 +-
.../staging/lustre/include/linux/lnet/lib-types.h | 46 +++++---
drivers/staging/lustre/include/linux/lnet/lnetst.h | 129 +++++++++++++--------
.../staging/lustre/include/linux/lnet/socklnd.h | 3 +-
4 files changed, 115 insertions(+), 66 deletions(-)
--
2.13.0
This patch fixes a warning generated by checkpatch for
a line over 80 characters.
Signed-off-by: Craig Inches <[email protected]>
---
drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 8ae7423b4543..f534115d402a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -453,7 +453,8 @@ extern int portal_rotor;
int lnet_lib_init(void);
void lnet_lib_exit(void);
-int lnet_notify(struct lnet_ni *ni, lnet_nid_t peer, int alive, unsigned long when);
+int lnet_notify(struct lnet_ni *ni, lnet_nid_t peer, int alive,
+ unsigned long when);
void lnet_notify_locked(struct lnet_peer *lp, int notifylnd, int alive,
unsigned long when);
int lnet_add_route(__u32 net, __u32 hops, lnet_nid_t gateway_nid,
--
2.13.0
This patch fixes some multiline comment blocks which didnt conform
to the style guide, found by checkpatch.
Signed-off-by: Craig Inches <[email protected]>
---
.../staging/lustre/include/linux/lnet/lib-types.h | 46 ++++++++++++++--------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 321752dfe58b..ddb808ed5d0b 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -308,9 +308,11 @@ struct lnet_rc_data {
struct lnet_peer {
struct list_head lp_hashlist; /* chain on peer hash */
struct list_head lp_txq; /* messages blocking for
- tx credits */
+ * tx credits
+ */
struct list_head lp_rtrq; /* messages blocking for
- router credits */
+ * router credits
+ */
struct list_head lp_rtr_list; /* chain on router list */
int lp_txcredits; /* # tx credits available */
int lp_mintxcredits; /* low water mark */
@@ -319,23 +321,31 @@ struct lnet_peer {
unsigned int lp_alive:1; /* alive/dead? */
unsigned int lp_notify:1; /* notification outstanding? */
unsigned int lp_notifylnd:1;/* outstanding notification
- for LND? */
+ * for LND?
+ */
unsigned int lp_notifying:1; /* some thread is handling
- notification */
+ * notification
+ */
unsigned int lp_ping_notsent;/* SEND event outstanding
- from ping */
+ * from ping
+ */
int lp_alive_count; /* # times router went
- dead<->alive */
- long lp_txqnob; /* bytes queued for sending */
+ * dead<->alive
+ */
+ long lp_txqnob; /* ytes queued for sending */
unsigned long lp_timestamp; /* time of last aliveness
- news */
+ * news
+ */
unsigned long lp_ping_timestamp;/* time of last ping
- attempt */
+ * attempt
+ */
unsigned long lp_ping_deadline; /* != 0 if ping reply
- expected */
+ * expected
+ */
unsigned long lp_last_alive; /* when I was last alive */
unsigned long lp_last_query; /* when lp_ni was queried
- last time */
+ * last time
+ */
struct lnet_ni *lp_ni; /* interface peer is on */
lnet_nid_t lp_nid; /* peer's NID */
int lp_refcount; /* # refs */
@@ -386,7 +396,8 @@ struct lnet_route {
struct lnet_remotenet {
struct list_head lrn_list; /* chain on
- ln_remote_nets_hash */
+ * ln_remote_nets_hash
+ */
struct list_head lrn_routes; /* routes to me */
__u32 lrn_net; /* my net number */
};
@@ -399,14 +410,16 @@ struct lnet_remotenet {
struct lnet_rtrbufpool {
struct list_head rbp_bufs; /* my free buffer pool */
struct list_head rbp_msgs; /* messages blocking
- for a buffer */
+ * for a buffer
+ */
int rbp_npages; /* # pages in each buffer */
/* requested number of buffers */
int rbp_req_nbuffers;
/* # buffers actually allocated */
int rbp_nbuffers;
- int rbp_credits; /* # free buffers /
- blocked messages */
+ int rbp_credits; /* # free buffers
+ * blocked messages
+ */
int rbp_mincredits; /* low water mark */
};
@@ -442,7 +455,8 @@ enum lnet_match_flags {
#define LNET_PTL_LAZY (1 << 0)
#define LNET_PTL_MATCH_UNIQUE (1 << 1) /* unique match, for RDMA */
#define LNET_PTL_MATCH_WILDCARD (1 << 2) /* wildcard match,
- request portal */
+ * request portal
+ */
/* parameter for matching operations (GET, PUT) */
struct lnet_match_info {
--
2.13.0
This fixes a block statement which didnt end with */
Signed-off-by: Craig Inches <[email protected]>
---
drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
index dd5bc0e46560..a1ae66ede7a8 100644
--- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
+++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
@@ -76,7 +76,8 @@ struct ksock_msg {
__u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
union {
struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
- * it's NOOP */
+ * it's NOOP
+ */
} WIRE_ATTR ksm_u;
} WIRE_ATTR;
--
2.13.0
This fixes multiple block statements found not to match
style as per checkpatch
Signed-off-by: Craig Inches <[email protected]>
---
drivers/staging/lustre/include/linux/lnet/lnetst.h | 129 +++++++++++++--------
1 file changed, 81 insertions(+), 48 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lnetst.h b/drivers/staging/lustre/include/linux/lnet/lnetst.h
index ea736f8d5231..a4f9ff01d458 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetst.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetst.h
@@ -54,7 +54,8 @@
#define LSTIO_GROUP_ADD 0xC10 /* add group */
#define LSTIO_GROUP_LIST 0xC11 /* list all groups in session */
#define LSTIO_GROUP_INFO 0xC12 /* query default information of
- * specified group */
+ * specified group
+ */
#define LSTIO_GROUP_DEL 0xC13 /* delete group */
#define LSTIO_NODES_ADD 0xC14 /* add nodes to specified group */
#define LSTIO_GROUP_UPDATE 0xC15 /* update group */
@@ -102,27 +103,32 @@ struct lstcon_test_ent {
int tse_type; /* test type */
int tse_loop; /* loop count */
int tse_concur; /* concurrency of test */
-}; /*** test summary entry, for
- *** list_batch command */
+}; /* test summary entry, for
+ * list_batch command
+ */
struct lstcon_batch_ent {
int bae_state; /* batch status */
int bae_timeout; /* batch timeout */
int bae_ntest; /* # of tests in the batch */
-}; /*** batch summary entry, for
- *** list_batch command */
+}; /* batch summary entry, for
+ * list_batch command
+ */
struct lstcon_test_batch_ent {
struct lstcon_ndlist_ent tbe_cli_nle; /* client (group) node_list
- * entry */
+ * entry
+ */
struct lstcon_ndlist_ent tbe_srv_nle; /* server (group) node_list
- * entry */
+ * entry
+ */
union {
struct lstcon_test_ent tbe_test; /* test entry */
struct lstcon_batch_ent tbe_batch;/* batch entry */
} u;
-}; /*** test/batch verbose information entry,
- *** for list_batch command */
+}; /* test/batch verbose information entry,
+ * for list_batch command
+ */
struct lstcon_rpc_ent {
struct list_head rpe_link; /* link chain */
@@ -138,10 +144,10 @@ struct lstcon_rpc_ent {
};
struct lstcon_trans_stat {
- int trs_rpc_stat[4]; /* RPCs stat (0: total
- 1: failed
- 2: finished
- 4: reserved */
+ int trs_rpc_stat[4]; /* RPCs stat (0: total 1: failed
+ * 2: finished
+ * 4: reserved
+ */
int trs_rpc_errno; /* RPC errno */
int trs_fwk_stat[8]; /* framework stat */
int trs_fwk_errno; /* errno of the first remote error */
@@ -275,22 +281,28 @@ struct lstio_session_end_args {
struct lstio_debug_args {
int lstio_dbg_key; /* IN: session key */
int lstio_dbg_type; /* IN: debug
- session|batch|
- group|nodes
- list */
+ * session|batch|
+ * group|nodes list
+ */
int lstio_dbg_flags; /* IN: reserved debug
- flags */
+ * flags
+ */
int lstio_dbg_timeout; /* IN: timeout of
- debug */
+ * debug
+ */
int lstio_dbg_nmlen; /* IN: len of name */
char __user *lstio_dbg_namep; /* IN: name of
- group|batch */
+ * group|batch
+ */
int lstio_dbg_count; /* IN: # of test nodes
- to debug */
+ * to debug
+ */
struct lnet_process_id __user *lstio_dbg_idsp; /* IN: id of test
- nodes */
+ * nodes
+ */
struct list_head __user *lstio_dbg_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_group_add_args {
@@ -307,7 +319,8 @@ struct lstio_group_del_args {
#define LST_GROUP_CLEAN 1 /* remove inactive nodes in the group */
#define LST_GROUP_REFRESH 2 /* refresh inactive nodes
- * in the group */
+ * in the group
+ */
#define LST_GROUP_RMND 3 /* delete nodes from the group */
struct lstio_group_update_args {
@@ -319,7 +332,8 @@ struct lstio_group_update_args {
int lstio_grp_count; /* IN: # of nodes id */
struct lnet_process_id __user *lstio_grp_idsp; /* IN: array of nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_group_nodes_args {
@@ -331,7 +345,8 @@ struct lstio_group_nodes_args {
unsigned int __user *lstio_grp_featp;
struct lnet_process_id __user *lstio_grp_idsp; /* IN: nodes */
struct list_head __user *lstio_grp_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_group_list_args {
@@ -345,8 +360,9 @@ struct lstio_group_info_args {
int lstio_grp_key; /* IN: session key */
int lstio_grp_nmlen; /* IN: name len */
char __user *lstio_grp_namep; /* IN: name */
- struct lstcon_ndlist_ent __user *lstio_grp_entp;/* OUT: description of
- group */
+ struct lstcon_ndlist_ent __user *lstio_grp_entp;/* OUT: description
+ * of group
+ */
int __user *lstio_grp_idxp; /* IN/OUT: node index */
int __user *lstio_grp_ndentp; /* IN/OUT: # of nodent */
struct lstcon_node_ent __user *lstio_grp_dentsp;/* OUT: nodent array */
@@ -369,34 +385,41 @@ struct lstio_batch_del_args {
struct lstio_batch_run_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_timeout; /* IN: timeout for
- the batch */
+ * the batch
+ */
int lstio_bat_nmlen; /* IN: name length */
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_batch_stop_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_force; /* IN: abort unfinished
- test RPC */
+ * test RPC
+ */
int lstio_bat_nmlen; /* IN: name length */
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_batch_query_args {
int lstio_bat_key; /* IN: session key */
int lstio_bat_testidx; /* IN: test index */
int lstio_bat_client; /* IN: we testing
- client? */
+ * client?
+ */
int lstio_bat_timeout; /* IN: timeout for
- waiting */
+ * waiting
+ */
int lstio_bat_nmlen; /* IN: name length */
char __user *lstio_bat_namep; /* IN: batch name */
struct list_head __user *lstio_bat_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
struct lstio_batch_list_args {
@@ -411,7 +434,8 @@ struct lstio_batch_info_args {
int lstio_bat_nmlen; /* IN: name length */
char __user *lstio_bat_namep; /* IN: name */
int lstio_bat_server; /* IN: query server
- or not */
+ * or not
+ */
int lstio_bat_testidx; /* IN: test index */
struct lstcon_test_batch_ent __user *lstio_bat_entp;/* OUT: batch ent */
@@ -424,14 +448,17 @@ struct lstio_batch_info_args {
struct lstio_stat_args {
int lstio_sta_key; /* IN: session key */
int lstio_sta_timeout; /* IN: timeout for
- stat request */
+ * stat request
+ */
int lstio_sta_nmlen; /* IN: group name
- length */
+ * length
+ */
char __user *lstio_sta_namep; /* IN: group name */
int lstio_sta_count; /* IN: # of pid */
struct lnet_process_id __user *lstio_sta_idsp; /* IN: pid */
struct list_head __user *lstio_sta_resultp; /* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
enum lst_test_type {
@@ -452,26 +479,32 @@ struct lstio_test_args {
int lstio_tes_concur; /* IN: concurrency */
int lstio_tes_dist; /* IN: node distribution in
- destination groups */
+ * destination groups
+ */
int lstio_tes_span; /* IN: node span in
- destination groups */
+ * destination groups
+ */
int lstio_tes_sgrp_nmlen; /* IN: source group
- name length */
+ * name length
+ */
char __user *lstio_tes_sgrp_name; /* IN: group name */
int lstio_tes_dgrp_nmlen; /* IN: destination group
- name length */
+ * name length
+ */
char __user *lstio_tes_dgrp_name; /* IN: group name */
int lstio_tes_param_len; /* IN: param buffer len */
void __user *lstio_tes_param; /* IN: parameter for specified
- test:
- lstio_bulk_param_t,
- lstio_ping_param_t,
- ... more */
+ * test: lstio_bulk_param_t,
+ * lstio_ping_param_t,
+ * ... more
+ */
int __user *lstio_tes_retp; /* OUT: private returned
- value */
+ * value
+ */
struct list_head __user *lstio_tes_resultp;/* OUT: list head of
- result buffer */
+ * result buffer
+ */
};
enum lst_brw_type {
--
2.13.0
On Jul 12, 2017, at 03:03, Craig Inches <[email protected]> wrote:
>
> This fixes a block statement which didnt end with */
>
> Signed-off-by: Craig Inches <[email protected]>
> ---
> drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> index dd5bc0e46560..a1ae66ede7a8 100644
> --- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
> +++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> @@ -76,7 +76,8 @@ struct ksock_msg {
> __u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
> union {
> struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
> - * it's NOOP */
> + * it's NOOP
> + */
Rather than making the multi-line comments even more space consuming (I'm not a big
fan of "*/ must be on a line by itself" since it wastes a lot of vertical space),
I'd prefer to just shorten the comment, if possible, like:
struct ksock_lnet_msg lnetmsg; /* lnet message, empty if NOOP */
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
On Mon, Jul 17, 2017 at 05:44:59PM +0000, Dilger, Andreas wrote:
> On Jul 12, 2017, at 03:03, Craig Inches <[email protected]> wrote:
> >
> > This fixes a block statement which didnt end with */
> >
> > Signed-off-by: Craig Inches <[email protected]>
> > ---
> > drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > index dd5bc0e46560..a1ae66ede7a8 100644
> > --- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > +++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > @@ -76,7 +76,8 @@ struct ksock_msg {
> > __u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
> > union {
> > struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
> > - * it's NOOP */
> > + * it's NOOP
> > + */
>
> Rather than making the multi-line comments even more space consuming (I'm not a big
> fan of "*/ must be on a line by itself" since it wastes a lot of vertical space),
> I'd prefer to just shorten the comment, if possible, like:
>
> struct ksock_lnet_msg lnetmsg; /* lnet message, empty if NOOP */
That makes sense, I believe the series has already made it to
staging-next, so not sure what the process would be to fix it up.
I am doing another set of style fixes which I can include this change
aswell.
Cheers,
Craig
On Mon, Jul 17, 2017 at 05:50:27PM +0000, Craig Inches wrote:
> On Mon, Jul 17, 2017 at 05:44:59PM +0000, Dilger, Andreas wrote:
> > On Jul 12, 2017, at 03:03, Craig Inches <[email protected]> wrote:
> > >
> > > This fixes a block statement which didnt end with */
> > >
> > > Signed-off-by: Craig Inches <[email protected]>
> > > ---
> > > drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/lustre/include/linux/lnet/socklnd.h b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > > index dd5bc0e46560..a1ae66ede7a8 100644
> > > --- a/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > > +++ b/drivers/staging/lustre/include/linux/lnet/socklnd.h
> > > @@ -76,7 +76,8 @@ struct ksock_msg {
> > > __u64 ksm_zc_cookies[2]; /* Zero-Copy request/ACK cookie */
> > > union {
> > > struct ksock_lnet_msg lnetmsg; /* lnet message, it's empty if
> > > - * it's NOOP */
> > > + * it's NOOP
> > > + */
> >
> > Rather than making the multi-line comments even more space consuming (I'm not a big
> > fan of "*/ must be on a line by itself" since it wastes a lot of vertical space),
> > I'd prefer to just shorten the comment, if possible, like:
> >
> > struct ksock_lnet_msg lnetmsg; /* lnet message, empty if NOOP */
>
> That makes sense, I believe the series has already made it to
> staging-next, so not sure what the process would be to fix it up.
staging-next can't be rebased (barring something very drastic). Send a
new patch based on what's been committed.
regards,
dan carpenter