From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (ina2xx) Remove casting the return value which is a void pointer
Date: Mon, 09 Sep 2013 10:40:11 +0000 [thread overview]
Message-ID: <522DA58B.7040101@roeck-us.net> (raw)
In-Reply-To: <004f01cead1d$904daeb0$b0e90c10$%han@samsung.com>
On 09/08/2013 11:53 PM, Jean Delvare wrote:
> On Mon, 09 Sep 2013 14:29:32 +0900, 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>
>> ---
>> drivers/hwmon/ina2xx.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
>> index 18c0623..70a39a8 100644
>> --- a/drivers/hwmon/ina2xx.c
>> +++ b/drivers/hwmon/ina2xx.c
>> @@ -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 <khali@linux-fr.org>
>
> Guenter, I'll let you pick it.
>
Applied, thanks
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2013-09-09 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 5:29 [lm-sensors] [PATCH] hwmon: (ina2xx) Remove casting the return value which is a void pointer Jingoo Han
2013-09-09 6:53 ` Jean Delvare
2013-09-09 10:40 ` Guenter Roeck [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=522DA58B.7040101@roeck-us.net \
--to=linux@roeck-us.net \
--cc=lm-sensors@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.