Skip to contentSkip to conversation

infsd4: convert comma to semicolon

PATCH In review Himangi Saraogi 2 participants 2 messages Jul 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 infsd4: convert comma to semicolon

Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended.

A simplified version of the Coccinelle semantic patch that performs this transformation is as follows:
// <smpl>
@r@
expression e1,e2;
@@

e1
-,
+;
e2;
// </smpl>

---
 fs/nfsd/nfs4callback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4callback.c +1 -1
index 564d723..c393d6c 100644
@@ -678,7 +678,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 				(clp->cl_cred.cr_flavor >= RPC_AUTH_GSS_KRB5))
 			return -EINVAL;
 		args.client_name = clp->cl_cred.cr_principal;
-		args.prognumber	= conn->cb_prog,
+		args.prognumber	= conn->cb_prog;
 		args.protocol = XPRT_TRANSPORT_TCP;
 		args.authflavor = clp->cl_cred.cr_flavor;
 		clp->cl_cb_ident = conn->cb_ident;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 11 lines · Himangi Saraogi

Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended.

A simplified version of the Coccinelle semantic patch that performs this transformation is as follows:
// <smpl>
@r@
expression e1,e2;
@@

Quoted 5 lines

e1
-,
+;
e2;
// </smpl>

Thanks, applying for 3.17.--b.

Quoted 23 lines
---
 fs/nfsd/nfs4callback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4callback.c +1 -1
index 564d723..c393d6c 100644
@@ -678,7 +678,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 				(clp->cl_cred.cr_flavor >= RPC_AUTH_GSS_KRB5))
 			return -EINVAL;
 		args.client_name = clp->cl_cred.cr_principal;
-		args.prognumber	= conn->cb_prog,
+		args.prognumber	= conn->cb_prog;
 		args.protocol = XPRT_TRANSPORT_TCP;
 		args.authflavor = clp->cl_cred.cr_flavor;
 		clp->cl_cb_ident = conn->cb_ident;
Signature · 1 line
1.9.1