From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 2/2] hwmon: (lm95245) Convert to use devm_hwmon_device_register_with_groups
Date: Sat, 22 Feb 2014 17:18:59 +0000 [thread overview]
Message-ID: <5308DC03.50203@roeck-us.net> (raw)
In-Reply-To: <1391747559-7601-2-git-send-email-linux@roeck-us.net>
On 02/22/2014 08:54 AM, Jean Delvare wrote:
> On Sat, 22 Feb 2014 07:52:30 -0800, Guenter Roeck wrote:
>> On 02/22/2014 05:32 AM, Jean Delvare wrote:
>>> On Thu, 6 Feb 2014 20:32:39 -0800, Guenter Roeck wrote:
>>>> @@ -286,8 +286,8 @@ static ssize_t set_crit_hyst(struct device *dev, struct device_attribute *attr,
>>>> const char *buf, size_t count)
>>>> {
>>>> struct lm95245_data *data = lm95245_update_device(dev);
>>>> - struct i2c_client *client = to_i2c_client(dev);
>>>> int index = to_sensor_dev_attr(attr)->index;
>>>> + struct i2c_client *client = data->client;
>>>
>>> I'm curious why you're swapping these lines? I can't find a rationale
>>> for it, and it makes the patch (very slightly) larger.
>>
>> Habit I picked up from one of the Intel maintainers ... long variable names
>> first. It makes the code look a bit nicer.
>
> I agree with the idea in general, when writing the code, it indeed
> makes the code easier to read. However moving a declaration along later
> because it is now 4 characters shorter than it used to be... Seems a
> bit difficult to justify ;-)
>
> No big deal anyway. I'm not doing the work so I don't really have my
> say!
>
H Jean,
I just like it neat :-). Other side of the coin would be that keeping it
sorted early on only to let it deteriorate later doesn't sound good either.
I'll resubmit the entire series. After making the change to no longer use
update_device in the set function, the code looked too much different to
just use your Reviewed-by.
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:[~2014-02-22 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 4:32 [lm-sensors] [PATCH 2/2] hwmon: (lm95245) Convert to use devm_hwmon_device_register_with_groups Guenter Roeck
2014-02-22 13:32 ` Jean Delvare
2014-02-22 15:52 ` Guenter Roeck
2014-02-22 16:54 ` Jean Delvare
2014-02-22 17:18 ` 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=5308DC03.50203@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.