Skip to contentSkip to conversation

Staging: Remove exceptional & on function name

PATCH Superseded Sandhya Bankar 2 participants 4 messages Sep 17, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Staging: Remove exceptional & on function name

The function names is itself used as pointers without &. This changes are made by below coccinelle script:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Sandhya Bankar (2):
Staging: lustre: file: Remove exceptional & on function name
Staging: lustre: namei: Remove exceptional & on function name

 drivers/staging/lustre/lustre/llite/file.c  |    2 +-
 drivers/staging/lustre/lustre/llite/namei.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/2 Staging: lustre: file: Remove exceptional & on function name

The function names is itself used as pointers without &. This changes made by below coccinelle script:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 drivers/staging/lustre/lustre/llite/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +1 -1
index bfac6dd..4965d15 100755
@@ -829,7 +829,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
 	it.it_flags = fmode | open_flags;
 	it.it_flags |= MDS_OPEN_LOCK | MDS_OPEN_BY_FID | MDS_OPEN_LEASE;
 	rc = md_intent_lock(sbi->ll_md_exp, op_data, &it, &req,
-			    &ll_md_blocking_lease_ast,
+			    ll_md_blocking_lease_ast,
 	/* LDLM_FL_NO_LRU: To not put the lease lock into LRU list, otherwise
 	 * it can be cancelled which may mislead applications that the lease is
 	 * broken;
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 Staging: lustre: namei: Remove exceptional & on function name

In reply to Sandhya Bankar

The function names is itself used as pointers without &. This changes made by below coccinelle script:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 drivers/staging/lustre/lustre/llite/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/lustre/lustre/llite/namei.c +1 -1
index b7d448f..aa10e7c 100755
@@ -551,7 +551,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
 		it->it_create_mode &= ~current_umask();
 
 	rc = md_intent_lock(ll_i2mdexp(parent), op_data, it, &req,
-			    &ll_md_blocking_ast, 0);
+			    ll_md_blocking_ast, 0);
 	ll_finish_md_op_data(op_data);
 	if (rc < 0) {
 		retval = ERR_PTR(rc);
Signature · 1 line
1.7.1
#3 lore raw

Re: [Outreachy kernel] [PATCH 2/2] Staging: lustre: namei: Remove exceptional & on function name

Quoted 1 line · Sandhya Bankar

The function names is itself used as pointers without &.

The message is not very grammatical. "names" is plural, but "is" is singular. And "used as pointers" should I guess be "used as a pointer". Overall, you could try "A function name is already a pointer, and does not need &".

Quoted 1 line

This changes made by below coccinelle script:

This change is made by the following coccinelle script

Quoted 5 lines

// <smpl>
@r@
identifier f;
@@

Quoted 7 lines

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f

Actually, I would tend to put a blank line between rules, but if it is useful to save vertical space, I would drop the blank line after the second @@ in each rule.

julia

Quoted 31 lines

// </smpl>

---
 drivers/staging/lustre/lustre/llite/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/lustre/lustre/llite/namei.c +1 -2
index b7d448f..aa10e7c 100755
@@ -551,7 +551,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
 		it->it_create_mode &= ~current_umask();
 
 	rc = md_intent_lock(ll_i2mdexp(parent), op_data, it, &req,
-			    &ll_md_blocking_ast, 0);
+			    ll_md_blocking_ast, 0);
 	ll_finish_md_op_data(op_data);
 	if (rc < 0) {
 		retval = ERR_PTR(rc);
--

1.7.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/a3cc0b4ea1581aa6c4e6de29128d668b7fc55af3.1474093197.git.bankarsandhya512%40gmail.com.
For more options, visit https://groups.google.com/d/optout.