LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging:iio:Remove exceptional & on function name
@ 2016-02-05  3:53 Bhumika Goyal
  2016-02-06 18:19 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2016-02-05  3:53 UTC (permalink / raw)
  To: gregkh, lars, Michael.Hennerich, jic23, knaack.h, pmeerw
  Cc: linux-iio, devel, linux-kernel, Bhumika Goyal

In this file,function names are otherwise used as pointers without &.
Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

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

- &f
+ f
// </smpl>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 10c43dda..d1218d8 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -558,7 +558,7 @@ out:
 }
 
 static const struct iio_info ad5933_info = {
-	.read_raw = &ad5933_read_raw,
+	.read_raw = ad5933_read_raw,
 	.attrs = &ad5933_attribute_group,
 	.driver_module = THIS_MODULE,
 };
@@ -616,9 +616,9 @@ static int ad5933_ring_postdisable(struct iio_dev *indio_dev)
 }
 
 static const struct iio_buffer_setup_ops ad5933_ring_setup_ops = {
-	.preenable = &ad5933_ring_preenable,
-	.postenable = &ad5933_ring_postenable,
-	.postdisable = &ad5933_ring_postdisable,
+	.preenable = ad5933_ring_preenable,
+	.postenable = ad5933_ring_postenable,
+	.postdisable = ad5933_ring_postdisable,
 };
 
 static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev)
-- 
1.9.1

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

* Re: [PATCH] Staging:iio:Remove exceptional & on function name
  2016-02-05  3:53 [PATCH] Staging:iio:Remove exceptional & on function name Bhumika Goyal
@ 2016-02-06 18:19 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-02-06 18:19 UTC (permalink / raw)
  To: Bhumika Goyal, gregkh, lars, Michael.Hennerich, knaack.h, pmeerw
  Cc: linux-iio, devel, linux-kernel

On 05/02/16 03:53, Bhumika Goyal wrote:
> In this file,function names are otherwise used as pointers without &.
> Found using coccinelle.
> // <smpl>
> @r@
> identifier f;
> @@
> 
> f(...) { ... }
> @@
> identifier r.f;
> @@
> 
> - &f
> + f
> // </smpl>
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Nice little bit of tidying up.

Applied to the togreg branch of iio.git -  initially pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
> index 10c43dda..d1218d8 100644
> --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> @@ -558,7 +558,7 @@ out:
>  }
>  
>  static const struct iio_info ad5933_info = {
> -	.read_raw = &ad5933_read_raw,
> +	.read_raw = ad5933_read_raw,
>  	.attrs = &ad5933_attribute_group,
>  	.driver_module = THIS_MODULE,
>  };
> @@ -616,9 +616,9 @@ static int ad5933_ring_postdisable(struct iio_dev *indio_dev)
>  }
>  
>  static const struct iio_buffer_setup_ops ad5933_ring_setup_ops = {
> -	.preenable = &ad5933_ring_preenable,
> -	.postenable = &ad5933_ring_postenable,
> -	.postdisable = &ad5933_ring_postdisable,
> +	.preenable = ad5933_ring_preenable,
> +	.postenable = ad5933_ring_postenable,
> +	.postdisable = ad5933_ring_postdisable,
>  };
>  
>  static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev)
> 

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

end of thread, other threads:[~2016-02-06 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05  3:53 [PATCH] Staging:iio:Remove exceptional & on function name Bhumika Goyal
2016-02-06 18:19 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).