All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Staging: Remove exceptional & on function name
@ 2016-09-17  6:32 Sandhya Bankar
  2016-09-17  6:36 ` [PATCH 1/2] Staging: lustre: file: " Sandhya Bankar
  2016-09-17  6:39 ` [PATCH 2/2] Staging: lustre: namei: " Sandhya Bankar
  0 siblings, 2 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-09-17  6:32 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: oleg.drokin, andreas.dilger, jsimmons, gregkh

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(-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] Staging: lustre: file: Remove exceptional & on function name
  2016-09-17  6:32 [PATCH 0/2] Staging: Remove exceptional & on function name Sandhya Bankar
@ 2016-09-17  6:36 ` Sandhya Bankar
  2016-09-17  6:39 ` [PATCH 2/2] Staging: lustre: namei: " Sandhya Bankar
  1 sibling, 0 replies; 4+ messages in thread
From: Sandhya Bankar @ 2016-09-17  6:36 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, oleg.drokin, andreas.dilger, jsimmons

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>

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/lustre/lustre/llite/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index bfac6dd..4965d15 100755
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -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;
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Staging: lustre: namei: Remove exceptional & on function name
  2016-09-17  6:32 [PATCH 0/2] Staging: Remove exceptional & on function name Sandhya Bankar
  2016-09-17  6:36 ` [PATCH 1/2] Staging: lustre: file: " Sandhya Bankar
@ 2016-09-17  6:39 ` Sandhya Bankar
  2016-09-17 19:24   ` [Outreachy kernel] " Julia Lawall
  1 sibling, 1 reply; 4+ messages in thread
From: Sandhya Bankar @ 2016-09-17  6:39 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: oleg.drokin, andreas.dilger, jsimmons, gregkh

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>


Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/lustre/lustre/llite/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index b7d448f..aa10e7c 100755
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/2] Staging: lustre: namei: Remove exceptional & on function name
  2016-09-17  6:39 ` [PATCH 2/2] Staging: lustre: namei: " Sandhya Bankar
@ 2016-09-17 19:24   ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-09-17 19:24 UTC (permalink / raw)
  To: Sandhya Bankar
  Cc: outreachy-kernel, oleg.drokin, andreas.dilger, jsimmons, gregkh

On Sat, 17 Sep 2016, Sandhya Bankar wrote:

> 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 &".

> This changes made by below coccinelle script:

This change is made by the following coccinelle script

> // <smpl>
> @r@
> identifier f;
> @@
>
> 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

> // </smpl>
>
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
>  drivers/staging/lustre/lustre/llite/namei.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
> index b7d448f..aa10e7c 100755
> --- a/drivers/staging/lustre/lustre/llite/namei.c
> +++ b/drivers/staging/lustre/lustre/llite/namei.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-17 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-17  6:32 [PATCH 0/2] Staging: Remove exceptional & on function name Sandhya Bankar
2016-09-17  6:36 ` [PATCH 1/2] Staging: lustre: file: " Sandhya Bankar
2016-09-17  6:39 ` [PATCH 2/2] Staging: lustre: namei: " Sandhya Bankar
2016-09-17 19:24   ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.