Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614668
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iio: pressure: zpa2326: Remove unnecessary cast on void pointer |
| Date | 2017-04-02 11:00 +0200 |
| Message-ID | <trJwB-6BS-1@gated-at.bofh.it> (permalink) |
| References | <trs2J-3Q0-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/04/17 15:18, 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>
Applied and pushed out as testing as normal.
Thanks for these. Good to clean them up. It's one of my pet
hates, but still the sometimes get through ;)
Jonathan
> ---
> drivers/iio/pressure/zpa2326.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/pressure/zpa2326.c b/drivers/iio/pressure/zpa2326.c
> index c720c3a..e58a0ad 100644
> --- a/drivers/iio/pressure/zpa2326.c
> +++ b/drivers/iio/pressure/zpa2326.c
> @@ -751,7 +751,7 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
> */
> static irqreturn_t zpa2326_handle_irq(int irq, void *data)
> {
> - struct iio_dev *indio_dev = (struct iio_dev *)data;
> + struct iio_dev *indio_dev = data;
>
> if (iio_buffer_enabled(indio_dev)) {
> /* Timestamping needed for buffered sampling only. */
> @@ -790,7 +790,7 @@ static irqreturn_t zpa2326_handle_irq(int irq, void *data)
> */
> static irqreturn_t zpa2326_handle_threaded_irq(int irq, void *data)
> {
> - struct iio_dev *indio_dev = (struct iio_dev *)data;
> + struct iio_dev *indio_dev = data;
> struct zpa2326_private *priv = iio_priv(indio_dev);
> unsigned int val;
> bool cont;
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] iio: pressure: zpa2326: Remove unnecessary cast on void pointer simran singhal <singhalsimran0@gmail.com> - 2017-04-01 16:20 +0200 Re: [PATCH] iio: pressure: zpa2326: Remove unnecessary cast on void pointer Jonathan Cameron <jic23@kernel.org> - 2017-04-02 11:00 +0200
csiph-web