linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: iio: Remove unnecessary cast on void pointer
@ 2018-03-07 13:17 Arushi Singhal
  2018-03-07 19:53 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Arushi Singhal @ 2018-03-07 13:17 UTC (permalink / raw)
  To: lars
  Cc: Michael Hennerich, Jonathan Cameron, Hartmut Knaack,
	Peter Meerwald-Stadler, Greg Kroah-Hartman, linux-iio, devel,
	linux-kernel, outreachy-kernel

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|

- (T*)
  e
)

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 drivers/staging/iio/adc/ad7816.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index bfe180a..bf76a86 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -254,7 +254,7 @@ static const struct attribute_group ad7816_attribute_group = {
 static irqreturn_t ad7816_event_handler(int irq, void *private)
 {
 	iio_push_event(private, IIO_EVENT_CODE_AD7816_OTI,
-		       iio_get_time_ns((struct iio_dev *)private));
+		       iio_get_time_ns(private));
 	return IRQ_HANDLED;
 }
 
-- 
2.7.4

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

end of thread, other threads:[~2018-03-07 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 13:17 [PATCH] staging: iio: Remove unnecessary cast on void pointer Arushi Singhal
2018-03-07 19:53 ` 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 NNTP newsgroup(s).