Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614534 > unrolled thread

[PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on void pointer

Started bysimran singhal <singhalsimran0@gmail.com>
First post2017-04-01 16:20 +0200
Last post2017-04-02 11:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on  void pointer simran singhal <singhalsimran0@gmail.com> - 2017-04-01 16:20 +0200
    Re: [PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on  void pointer Jonathan Cameron <jic23@kernel.org> - 2017-04-02 11:00 +0200

#1614534 — [PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on void pointer

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-04-01 16:20 +0200
Subject[PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on void pointer
Message-ID<trs2J-3Q0-1@gated-at.bofh.it>
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: simran singhal <singhalsimran0@gmail.com>
---
 drivers/iio/humidity/hts221_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c
index 72ddcda..7d19a3d 100644
--- a/drivers/iio/humidity/hts221_buffer.c
+++ b/drivers/iio/humidity/hts221_buffer.c
@@ -41,7 +41,7 @@ static const struct iio_trigger_ops hts221_trigger_ops = {
 
 static irqreturn_t hts221_trigger_handler_thread(int irq, void *private)
 {
-	struct hts221_hw *hw = (struct hts221_hw *)private;
+	struct hts221_hw *hw = private;
 	u8 status;
 	int err;
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1614673

FromJonathan Cameron <jic23@kernel.org>
Date2017-04-02 11:00 +0200
Message-ID<trJwB-6BS-11@gated-at.bofh.it>
In reply to#1614534
On 01/04/17 15:14, simran singhal wrote:
> 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: simran singhal <singhalsimran0@gmail.com>
I made a miinor change to the title to drop the _buffer.
That's naming the exact file, whereas keeping it to the driver
is fine (so just hts221).

Applied.

Thanks,

Jonathan
> ---
>  drivers/iio/humidity/hts221_buffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c
> index 72ddcda..7d19a3d 100644
> --- a/drivers/iio/humidity/hts221_buffer.c
> +++ b/drivers/iio/humidity/hts221_buffer.c
> @@ -41,7 +41,7 @@ static const struct iio_trigger_ops hts221_trigger_ops = {
>  
>  static irqreturn_t hts221_trigger_handler_thread(int irq, void *private)
>  {
> -	struct hts221_hw *hw = (struct hts221_hw *)private;
> +	struct hts221_hw *hw = private;
>  	u8 status;
>  	int err;
>  
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web