Staging: lustre: Add blank line after declarations
PATCH v2 1/10 Staging: lustre: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:
WARNING: Missing a blank line after declarations
The warning was handled in ten files:
-import.c
-client.c
-llog_client.c
-lproc_ptlrpc.c
-pack_generic.c
-pinger.c
-ptlrpcd.c
-sec.c
-sec_null.c
-service.c---
Changes in v2:
All put in a patch and changed commit message
drivers/staging/lustre/lustre/ptlrpc/import.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/import.c +2 -0
@@ -448,6 +448,7 @@ int ptlrpc_reconnect_import(struct obd_import *imp)if (atomic_read (&imp->imp_inval_count) >0 ) {int rc;struct l_wait_info lwi =LWI_INTR (LWI_ON_SIGNAL_NOOP ,NULL ); + rc =l_wait_event (imp->imp_recovery_waitq, (atomic_read (&imp->imp_inval_count) ==0 ), &lwi);
@@ -529,6 +530,7 @@ static int import_select_connection(struct obd_import *imp)trying to reconnect on it.) */ if (tried_all && (imp->imp_conn_list.next == &imp_conn->oic_item)) {struct adaptive_timeout *at = &imp->imp_at.iat_net_latency; +if (at_get (at) <CONNECTION_SWITCH_MAX ) {at_measured (at,at_get (at) +CONNECTION_SWITCH_INC );if (at_get (at) >CONNECTION_SWITCH_MAX )
Signature · 1 line
1.9.1
PATCH 2/10 Staging: lustre: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/client.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/client.c +2 -0
@@ -652,6 +652,7 @@ int ptlrpc_request_pack(struct ptlrpc_request *request, __u32 version, int opcode) { int rc; + rc =ptlrpc_request_bufs_pack (request, version, opcode,NULL ,NULL );if (rc)return rc;
@@ -1143,6 +1144,7 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)if (lustre_msg_get_type (req->rq_repmsg) ==PTL_RPC_MSG_ERR ) {struct obd_import *imp = req->rq_import;__u32 opc =lustre_msg_get_opc (req->rq_reqmsg); +if (ptlrpc_console_allow (req)) LCONSOLE_ERROR_MSG(0x011, "%s: Communicating with %s, operation %s failed with %d.\n", imp->imp_obd->obd_name,
Signature · 1 line
1.9.1
PATCH 3/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/llog_client.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/ptlrpc/llog_client.c +1 -0
@@ -118,6 +118,7 @@ static int llog_client_open(const struct lu_env *env,if (name) {char *tmp; + tmp =req_capsule_client_sized_get (&req->rq_pill, &RMF_NAME ,strlen (name) +1 );LASSERT (tmp);
Signature · 1 line
1.9.1
PATCH 4/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +3 -0
@@ -166,6 +166,7 @@ const char *ll_opcode2str(__u32 opcode)* ptlrpc_internal.h needs to be modified. */ __u32 offset =opcode_offset (opcode); +LASSERTF (offset <LUSTRE_MAX_OPCODES ,"offset %u >= LUSTRE_MAX_OPCODES %u\n" , offset,LUSTRE_MAX_OPCODES );
@@ -239,6 +240,7 @@ static void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir, }for (i =0 ; i <LUSTRE_MAX_OPCODES ; i++) {__u32 opcode = ll_rpc_opcode_table[i].opcode; +lprocfs_counter_init (svc_stats,EXTRA_MAX_OPCODES + i, svc_counter_config,ll_opcode2str (opcode),"usec" );
@@ -1026,6 +1028,7 @@ LPROC_SEQ_FOPS_RO(ptlrpc_lprocfs_timeouts);static int ptlrpc_lprocfs_hp_ratio_seq_show (struct seq_file *m,void *v) {struct ptlrpc_service *svc = m->private; +return seq_printf (m,"%d" , svc->srv_hpreq_ratio); }
Signature · 1 line
1.9.1
PATCH 5/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/pack_generic.c WARNING: Missing a blank line after declarations
--- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +24 -0
@@ -96,6 +96,7 @@ static inline int lustre_msg_check_version_v2(struct lustre_msg_v2 *msg, __u32 version) {__u32 ver =lustre_msg_get_version (msg); +return (ver &LUSTRE_VERSION_MASK ) != version; }
@@ -118,6 +119,7 @@ EXPORT_SYMBOL(lustre_msg_check_version);int lustre_msg_early_size (void ) {static int size =0 ; +if (!size) {/* Always reply old ptlrpc_body_v2 to keep interoprability * with the old client (< 2.3) which doesn't have pb_jobid
@@ -127,6 +129,7 @@ int lustre_msg_early_size(void)* client. */ __u32 pblen =sizeof (struct ptlrpc_body_v2 ); + size =lustre_msg_size (LUSTRE_MSG_MAGIC_V2 ,1 , &pblen); }return size;
@@ -207,6 +210,7 @@ void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, __u32 *lens, ptr = (char *)msg +lustre_msg_hdr_size_v2 (count);for (i =0 ; i < count; i++) {char *tmp = bufs[i]; +LOGL (tmp, lens[i], ptr); } }
@@ -591,6 +595,7 @@ EXPORT_SYMBOL(__lustre_unpack_msg);int ptlrpc_unpack_req_msg (struct ptlrpc_request *req,int len) {int rc; + rc =__lustre_unpack_msg (req->rq_reqmsg, len);if (rc ==1 ) {lustre_set_req_swabbed (req,MSG_PTLRPC_HEADER_OFF );
@@ -603,6 +608,7 @@ EXPORT_SYMBOL(ptlrpc_unpack_req_msg);int ptlrpc_unpack_rep_msg (struct ptlrpc_request *req,int len) {int rc; + rc =__lustre_unpack_msg (req->rq_repmsg, len);if (rc ==1 ) {lustre_set_rep_swabbed (req,MSG_PTLRPC_HEADER_OFF );
@@ -831,6 +837,7 @@ __u32 lustre_msg_get_flags(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -850,6 +857,7 @@ void lustre_msg_add_flags(struct lustre_msg *msg, int flags)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_flags |= flags;return ;
@@ -865,6 +873,7 @@ void lustre_msg_set_flags(struct lustre_msg *msg, int flags)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_flags = flags;return ;
@@ -880,6 +889,7 @@ void lustre_msg_clear_flags(struct lustre_msg *msg, int flags)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_flags &= ~(MSG_GEN_FLAG_MASK & flags);return ;
@@ -895,6 +905,7 @@ __u32 lustre_msg_get_op_flags(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -912,6 +923,7 @@ void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_op_flags |= flags;return ;
@@ -927,6 +939,7 @@ void lustre_msg_set_op_flags(struct lustre_msg *msg, int flags)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_op_flags |= flags;return ;
@@ -942,6 +955,7 @@ struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return NULL ;
@@ -960,6 +974,7 @@ __u32 lustre_msg_get_type(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return PTL_RPC_MSG_ERR ;
@@ -978,6 +993,7 @@ __u32 lustre_msg_get_version(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -996,6 +1012,7 @@ void lustre_msg_add_version(struct lustre_msg *msg, int version)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +LASSERTF (pb,"invalid msg %p: no ptlrpc body!\n" , msg); pb->pb_version |= version;return ;
@@ -1011,6 +1028,7 @@ __u32 lustre_msg_get_opc(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -1030,6 +1048,7 @@ __u64 lustre_msg_get_last_xid(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -1048,6 +1067,7 @@ __u64 lustre_msg_get_last_committed(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +"if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -1068,6 +1088,7 @@ __u64 *lustre_msg_get_versions(struct lustre_msg *msg)return NULL ;case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return NULL ;
@@ -1086,6 +1107,7 @@ __u64 lustre_msg_get_transno(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return 0 ;
@@ -1104,6 +1126,7 @@ int lustre_msg_get_status(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return -EINVAL ;
@@ -1123,6 +1146,7 @@ __u64 lustre_msg_get_slv(struct lustre_msg *msg)switch (msg->lm_magic) {case LUSTRE_MSG_MAGIC_V2 : {struct ptlrpc_body *pb =lustre_msg_ptlrpc_body (msg); +if (!pb) {CERROR ("invalid msg %p: no ptlrpc body!\n" , msg);return -EINVAL ;
Signature · 1 line
1.9.1
PATCH 6/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/pinger.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/pinger.c +2 -0
@@ -113,6 +113,7 @@ int ptlrpc_ping(struct obd_import *imp)void ptlrpc_update_next_ping (struct obd_import *imp,int soon) {int time = soon ?PING_INTERVAL_SHORT :PING_INTERVAL ; +if (imp->imp_state ==LUSTRE_IMP_DISCON ) { int dtime = max_t(int, CONNECTION_SWITCH_MIN, AT_OFF ? 0 :
@@ -150,6 +151,7 @@ long pinger_check_timeout(unsigned long time)mutex_lock (&pinger_mutex);list_for_each_entry (item, &timeout_list, ti_chain) {int ti_timeout = item->ti_timeout; +if (timeout > ti_timeout) timeout = ti_timeout;break ;
Signature · 1 line
1.9.1
PATCH 7/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +2 -0
@@ -511,6 +511,7 @@ static int ptlrpcd_bind(int index, int max)#if defined(CONFIG_NUMA ) {int i; + mask = *cpumask_of_node (cpu_to_node (index));for (i = max; i <num_online_cpus (); i++)cpu_clear (i, mask);
@@ -625,6 +626,7 @@ int ptlrpcd_start(int index, int max, const char *name, struct ptlrpcd_ctl *pc) {struct task_struct *task; +if (index >=0 ) { rc =ptlrpcd_bind (index, max);if (rc <0 )
Signature · 1 line
1.9.1
PATCH 8/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/sec.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/sec.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/ptlrpc/sec.c +1 -0
@@ -2090,6 +2090,7 @@ int sptlrpc_svc_alloc_rs(struct ptlrpc_request *req, int msglen) rc = policy->sp_sops->alloc_rs (req, msglen);if (unlikely (rc == -ENOMEM )) {struct ptlrpc_service_part *svcpt = req->rq_rqbd->rqbd_svcpt; +if (svcpt->scp_service->srv_max_reply_size < msglen +sizeof (struct ptlrpc_reply_state )) {/* Just return failure if the size is too big */
Signature · 1 line
1.9.1
PATCH 9/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/sec_null.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/ptlrpc/sec_null.c +1 -0
@@ -82,6 +82,7 @@ int null_ctx_sign(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)if (!req->rq_import->imp_dlm_fake) {struct obd_device *obd = req->rq_import->imp_obd; +null_encode_sec_part (req->rq_reqbuf, obd->u.cli.cl_sp_me); }
Signature · 1 line
1.9.1
PATCH 10/10 Staging: lustre: Add blank line after declarations
In reply to Dilek UzulmezThe following patch fixes the checkpatch.pl warning:drivers/staging/lustre/lustre/ptlrpc/service.c WARNING: Missing a blank line after declarations
--- drivers/staging/lustre/lustre/ptlrpc/service.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/staging/lustre/lustre/ptlrpc/service.c +3 -0
@@ -1633,6 +1633,7 @@ static bool ptlrpc_server_allow_normal(struct ptlrpc_service_part *svcpt, bool force) {int running = svcpt->scp_nthrs_running; +if (unlikely (svcpt->scp_service->srv_req_portal ==MDS_REQUEST_PORTAL &&CFS_FAIL_PRECHECK (OBD_FAIL_PTLRPC_CANCEL_RESEND ))) {/* leave just 1 thread for normal RPCs */
@@ -1998,6 +1999,7 @@ put_conn:if (likely (svc->srv_stats !=NULL && request->rq_reqmsg !=NULL )) {__u32 op =lustre_msg_get_opc (request->rq_reqmsg);int opc =opcode_offset (op); +if (opc >0 && !(op ==LDLM_ENQUEUE || op ==MDS_REINT )) {LASSERT (opc <LUSTRE_MAX_OPCODES ); lprocfs_counter_add(svc->srv_stats,
@@ -2533,6 +2535,7 @@ static int ptlrpc_start_hr_threads(void)for (j =0 ; j < hrp->hrp_nthrs; j++) {struct ptlrpc_hr_thread *hrt = &hrp->hrp_thrs[j]; + rc = PTR_ERR(kthread_run(ptlrpc_hr_main, &hrp->hrp_thrs[j], "ptlrpc_hr%02d_%03d",
Signature · 1 line
1.9.1
Quoted 4 lines · Dilek Uzulmez
The following patch fixes the checkpatch.pl warning:
WARNING: Missing a blank line after declarationsThe warning was handled in ten files:
This information should be specified in a cover letter. The log message for this patch should only mention what is done in this patch.
julia
Quoted 50 lines
-import.c -client.c -llog_client.c -lproc_ptlrpc.c -pack_generic.c -pinger.c -ptlrpcd.c -sec.c -sec_null.c -service.cSigned-off-by Dilek Uzulmez <[email protected]>---
Changes in v2:
All put in a patch and changed commit messagedrivers/staging/lustre/lustre/ptlrpc/import.c | 2 ++ 1 file changed, 2 insertions(+)drivers/staging/lustre/lustre/ptlrpc/import.c +2
-1@@ -448,6 +448,7 @@ int ptlrpc_reconnect_import(struct obd_import *imp)if (atomic_read (&imp->imp_inval_count) >0 ) {int rc;struct l_wait_info lwi =LWI_INTR (LWI_ON_SIGNAL_NOOP ,NULL ); + rc =l_wait_event (imp->imp_recovery_waitq, (atomic_read (&imp->imp_inval_count) ==0 ), &lwi);@@ -529,6 +530,7 @@ static int import_select_connection(struct obd_import *imp)trying to reconnect on it.) */ if (tried_all && (imp->imp_conn_list.next == &imp_conn->oic_item)) {struct adaptive_timeout *at = &imp->imp_at.iat_net_latency; +if (at_get (at) <CONNECTION_SWITCH_MAX ) {at_measured (at,at_get (at) +CONNECTION_SWITCH_INC );if (at_get (at) >CONNECTION_SWITCH_MAX ) --1.9.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425122715-2938-1-git-send-email-dilekuzulmez%40gmail.com.
For more options, visit https://groups.google.com/d/optout.