Staging: Lustre Style Fixes
cover Staging: Lustre Style Fixes
This series fixes a few style issues in lustre. All where picked up by checkpatch.
Craig Inches (4):
Staging: Luster: 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(-)
Signature · 1 line
2.13.0
PATCH 1/4 Staging: Luster: Clean up line over 80Char in lib-lnet.h
This patch fixes a warning generated by checkpatch for a line over 80 characters.
--- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/include/linux/lnet/lib-lnet.h +2 -1
@@ -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,
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerRe: [PATCH 1/4] Staging: Luster: Clean up line over 80Char in lib-lnet.h
Quoted 7 lines · Craig Inches
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(-)
Your subject line mispelled the filesystem's name :(
PATCH 2/4 Staging: Lustre Fix up multiple Block Comments in lib-types.h
In reply to Craig InchesThis patch fixes some multiline comment blocks which didnt conform to the style guide, found by checkpatch.
--- .../staging/lustre/include/linux/lnet/lib-types.h | 46 ++++++++++++++-------- 1 file changed, 30 insertions(+), 16 deletions(-)
drivers/staging/lustre/include/linux/lnet/lib-types.h +30 -16
@@ -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 {
Signature · 1 line
2.13.0
PATCH 3/4 Staging: Lustre Fixing multiline block comments in lnetst.h
In reply to Craig InchesThis fixes multiple block statements found not to match style as per checkpatch
--- drivers/staging/lustre/include/linux/lnet/lnetst.h | 129 +++++++++++++-------- 1 file changed, 81 insertions(+), 48 deletions(-)
drivers/staging/lustre/include/linux/lnet/lnetst.h +81 -48
@@ -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 {
Signature · 1 line
2.13.0
Greg Kroah-Hartman
maintainerRe: [PATCH 3/4] Staging: Lustre Fixing multiline block comments in lnetst.h
Quoted 23 lines · Craig Inches
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(-)drivers/staging/lustre/include/linux/lnet/lnetst.h +2
-1@@ -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 */
drivers/staging/lustre/include/linux/lnet/lnetst.h struct lstcon_test_ent { · line 108
Quoted 8 lines
drivers/staging/lustre/include/linux/lnet/lnetst.h +3
-2@@ -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 +*/
That's odd, what was the *** stuff for?
I'd like to get a lustre maintainer's ack for all of these before I apply them...
thanks,
greg k-h
Dilger, Andreas
Reviewed-byRe: [PATCH 3/4] Staging: Lustre Fixing multiline block comments in lnetst.h
Quoted 36 lines · Greg Kroah-Hartman
Quoted 23 lines · Craig Inches
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(-)drivers/staging/lustre/include/linux/lnet/lnetst.h +2
-1@@ -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 */ drivers/staging/lustre/include/linux/lnet/lnetst.h struct lstcon_test_ent { · line 108
Quoted 8 lines
drivers/staging/lustre/include/linux/lnet/lnetst.h +3
-2@@ -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 +*/ That's odd, what was the *** stuff for?
Quoted 2 lines
I'd like to get a lustre maintainer's ack for all of these before I apply them...
It's nothing that I know about. We used DOxygen to comment the code and generate docs, but the "***" isn't any markup that I'm familiar with.
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation
PATCH 4/4 Staging: Lustre Fix block statement style issue
In reply to Craig InchesThis fixes a block statement which didnt end with */
--- drivers/staging/lustre/include/linux/lnet/socklnd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/include/linux/lnet/socklnd.h +2 -1
@@ -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 ;
Signature · 1 line
2.13.0