From: Guenter Roeck <linux@roeck-us.net>
To: "Sung-Chi Li" <lschyi@chromium.org>,
"Thomas Weißschuh" <linux@weissschuh.net>
Cc: Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Jean Delvare <jdelvare@suse.com>,
Jonathan Corbet <corbet@lwn.net>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 2/3] hwmon: (cros_ec) add PWM control over fans
Date: Wed, 18 Jun 2025 05:53:29 -0700 [thread overview]
Message-ID: <6cd4eb0f-4b4b-4540-877b-6531023b4a5d@roeck-us.net> (raw)
In-Reply-To: <aFJqLkkdI86V3fM9@google.com>
On 6/18/25 00:26, Sung-Chi Li wrote:
> On Mon, May 12, 2025 at 09:30:39AM +0200, Thomas Weißschuh wrote:
>
> Sorry for the late reply, I missed mails for this series.
>
>> On 2025-05-12 15:11:56+0800, Sung-Chi Li via B4 Relay wrote:
>>> From: Sung-Chi Li <lschyi@chromium.org>
>>> static int cros_ec_hwmon_read_temp(struct cros_ec_device *cros_ec, u8 index, u8 *temp)
>>> {
>>> unsigned int offset;
>>> @@ -73,7 +117,9 @@ static long cros_ec_hwmon_temp_to_millicelsius(u8 temp)
>>> static int cros_ec_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
>>> u32 attr, int channel, long *val)
>>> {
>>> + u8 control_method;
>>> struct cros_ec_hwmon_priv *priv = dev_get_drvdata(dev);
>>> + u8 pwm_value;
>>> int ret = -EOPNOTSUPP;
>>> u16 speed;
>>> u8 temp;
>>
>> Ordering again.
>>
>> This should be:
>>
>> struct cros_ec_hwmon_priv *priv = dev_get_drvdata(dev);
>> int ret = -EOPNOTSUPP;
>> u8 control_method;
>> u8 pwm_value;
>> u16 speed;
>> u8 temp;
>>
>> or:
>>
>> struct cros_ec_hwmon_priv *priv = dev_get_drvdata(dev);
>> u8 control_method, pwm_value, temp;
>> int ret = -EOPNOTSUPP;
>> u16 speed;
>>
>> <snip>
>>
>
> Would you mind to share the sorting logic, so I do not bother you with checking
> these styling issue? Initially, I thought the sorting is based on the variable
> name, but after seeing your example (which I am appreciated), I am not sure how
> the sorting works. Is it sorted along with the variable types (
> "u8 control_method", "u16 speed", etc)? If that is the case, why "u16 speed" is
> in the middle of the u8 group variables?
>
It is called "reverse christmas tree". Longer lines first.
Guenter
next prev parent reply other threads:[~2025-06-18 12:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 7:11 [PATCH v3 0/3] Export fan control and register fans as cooling devices Sung-Chi Li via B4 Relay
2025-05-12 7:11 ` [PATCH v3 1/3] platform/chrome: update pwm fan control host commands Sung-Chi Li via B4 Relay
2025-05-12 7:11 ` [PATCH v3 2/3] hwmon: (cros_ec) add PWM control over fans Sung-Chi Li via B4 Relay
2025-05-12 7:30 ` Thomas Weißschuh
2025-06-18 7:26 ` Sung-Chi Li
2025-06-18 10:40 ` Thomas Weißschuh
2025-06-18 12:53 ` Guenter Roeck [this message]
2025-05-12 7:11 ` [PATCH v3 3/3] hwmon: (cros_ec) register fans into thermal framework cooling devices Sung-Chi Li via B4 Relay
2025-05-12 7:35 ` Thomas Weißschuh
2025-06-19 7:31 ` Sung-Chi Li
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=6cd4eb0f-4b4b-4540-877b-6531023b4a5d@roeck-us.net \
--to=linux@roeck-us.net \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=corbet@lwn.net \
--cc=groeck@chromium.org \
--cc=jdelvare@suse.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lschyi@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®