All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jingoo Han <jg1.han@samsung.com>
Cc: linux-iio@vger.kernel.org, 'Ge Gao' <ggao@invensense.com>
Subject: Re: [PATCH] iio: imu: inv_mpu6050: Remove casting the return value which is a void pointer
Date: Sat, 30 Aug 2014 10:32:07 +0100	[thread overview]
Message-ID: <54019A17.7060600@kernel.org> (raw)
In-Reply-To: <005901cfc33d$46e99bd0$d4bcd370$%han@samsung.com>

On 29/08/14 04:56, Jingoo Han wrote:
> Casting the return value which is a void pointer is redundant.
> The conversion from void pointer to any other pointer type is
> guaranteed by the C programming language.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play.

Thanks,

Jonathan
> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> index 0c6517c94a9d..b75519deac1a 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> @@ -673,8 +673,7 @@ static int inv_mpu_probe(struct i2c_client *client,
>  
>  	st = iio_priv(indio_dev);
>  	st->client = client;
> -	pdata = (struct inv_mpu6050_platform_data
> -			*)dev_get_platdata(&client->dev);
> +	pdata = dev_get_platdata(&client->dev);
>  	if (pdata)
>  		st->plat_data = *pdata;
>  	/* power is turned on inside check chip type*/
> 

      reply	other threads:[~2014-08-30  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29  3:56 [PATCH] iio: imu: inv_mpu6050: Remove casting the return value which is a void pointer Jingoo Han
2014-08-30  9:32 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54019A17.7060600@kernel.org \
    --to=jic23@kernel.org \
    --cc=ggao@invensense.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.