* [PATCH] iio: imu: inv_mpu6050: Remove casting the return value which is a void pointer
@ 2014-08-29 3:56 Jingoo Han
2014-08-30 9:32 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2014-08-29 3:56 UTC (permalink / raw)
To: 'Jonathan Cameron'
Cc: linux-iio, 'Ge Gao', 'Jingoo Han'
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>
---
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*/
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: imu: inv_mpu6050: Remove casting the return value which is a void pointer
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
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2014-08-30 9:32 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-iio, 'Ge Gao'
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*/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-30 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).