2014-07-23 14:41:23

by Himangi Saraogi

[permalink] [raw]
Subject: [PATCH] ceph: 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>

Signed-off-by: Himangi Saraogi <[email protected]>
Acked-by: Julia Lawall <[email protected]>
---
fs/ceph/caps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 1fde164..6d1cd45 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -3277,7 +3277,7 @@ int ceph_encode_inode_release(void **p, struct inode *inode,
rel->ino = cpu_to_le64(ceph_ino(inode));
rel->cap_id = cpu_to_le64(cap->cap_id);
rel->seq = cpu_to_le32(cap->seq);
- rel->issue_seq = cpu_to_le32(cap->issue_seq),
+ rel->issue_seq = cpu_to_le32(cap->issue_seq);
rel->mseq = cpu_to_le32(cap->mseq);
rel->caps = cpu_to_le32(cap->implemented);
rel->wanted = cpu_to_le32(cap->mds_wanted);
--
1.9.1


2014-07-24 08:09:49

by Ilya Dryomov

[permalink] [raw]
Subject: Re: [PATCH] ceph: convert comma to semicolon

On Wed, Jul 23, 2014 at 6:41 PM, Himangi Saraogi <[email protected]> wrote:
> 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>
>
> Signed-off-by: Himangi Saraogi <[email protected]>
> Acked-by: Julia Lawall <[email protected]>

Applied.

Thanks,

Ilya