hwmon: (ina2xx) Remove casting the return value which is a void pointer
PATCH 1/1 hwmon: (ina2xx) Remove casting the return value which is a void pointer
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.
--- drivers/hwmon/ina2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/hwmon/ina2xx.c +1 -1
@@ -233,8 +233,7 @@ static int ina2xx_probe(struct i2c_client *client,return -ENOMEM ;if (dev_get_platdata (&client->dev)) { - pdata - (struct ina2xx_platform_data *)dev_get_platdata (&client->dev); + pdata =dev_get_platdata (&client->dev); shunt = pdata->shunt_uohms; }else if (!of_property_read_u32 (client->dev.of_node,"shunt-resistor" , &val)) {
Signature · 8 lines
1.7.10.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 14 lines · 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 <[email protected]>--- drivers/hwmon/ina2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/hwmon/ina2xx.c +0
-0
drivers/hwmon/ina2xx.c static int ina2xx_probe(struct i2c_client *client, · line 239
Quoted 8 lines
drivers/hwmon/ina2xx.c +1
-1@@ -233,8 +233,7 @@ static int ina2xx_probe(struct i2c_client *client,return -ENOMEM ;if (dev_get_platdata (&client->dev)) { - pdata > - (struct ina2xx_platform_data *)dev_get_platdata (&client->dev); + pdata =dev_get_platdata (&client->dev); shunt = pdata->shunt_uohms; }else if (!of_property_read_u32 (client->dev.of_node,"shunt-resistor" , &val)) {
Guenter, I'll let you pick it.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 26 lines · Jean Delvare
Quoted 14 lines · 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 <[email protected]>--- drivers/hwmon/ina2xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/hwmon/ina2xx.c +0
-0drivers/hwmon/ina2xx.c static int ina2xx_probe(struct i2c_client *client, · line 239
Quoted 8 lines
drivers/hwmon/ina2xx.c +1
-1@@ -233,8 +233,7 @@ static int ina2xx_probe(struct i2c_client *client,return -ENOMEM ;if (dev_get_platdata (&client->dev)) { - pdata >> - (struct ina2xx_platform_data *)dev_get_platdata (&client->dev); + pdata =dev_get_platdata (&client->dev); shunt = pdata->shunt_uohms; }else if (!of_property_read_u32 (client->dev.of_node,"shunt-resistor" , &val)) {Acked-by Jean Delvare <[email protected]>
Quoted 2 lines
Guenter, I'll let you pick it.
Applied, thanks
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors