From: Alex Yeo <alexyeo362@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
Kenneth Chan <kenneth.t.chan@gmail.com>,
Hans de Goede <hansg@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
LKML <linux-kernel@vger.kernel.org>,
linux-hwmon@vger.kernel.org
Subject: Re: [RFC PATCH v7] platform/x86: panasonic-laptop: add fan speed mode for newer models
Date: Wed, 22 Jul 2026 06:10:10 +0800 [thread overview]
Message-ID: <bba0e7c6-e652-4dd8-a777-5e30dca810bf@gmail.com> (raw)
In-Reply-To: <fcf57a96-b2ad-c7d5-0d6d-6d760b915195@linux.intel.com>
On 2026/07/20 9:46 PM, Ilpo Järvinen wrote:
>> * - v0.1 start from toshiba_acpi driver written by John Belmonte
>> */
>>
>> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>> +
>> +#include <linux/printk.h>
>> #include <linux/acpi.h>
>> #include <linux/backlight.h>
>> #include <linux/bits.h>
>> @@ -136,6 +139,14 @@
>> #include <linux/types.h>
>> #include <linux/uaccess.h>
>> #include <acpi/video.h>
>> +#include <linux/sysfs.h>
>> +#include <linux/hwmon.h>
>> +#include <linux/hwmon-sysfs.h>
>> +#include <linux/thermal.h>
>> +#include <linux/dmi.h>
>> +#include <linux/errno.h>
>> +#include <linux/cleanup.h>
>> +#include <linux/minmax.h>
>
> Includes should be added in alphabetical order (per each subdirectory
> block).
>
Will sort the headers alphabetically within their respective blocks.
>> + {},
>> };
>>
>> /*
>> @@ -415,7 +468,6 @@ static const struct backlight_ops pcc_backlight_ops = {
>> .update_status = bl_set_status,
>> };
>>
>> -
>> /* returns ACPI_SUCCESS if methods to control optical drive are present */
>
> Unrelated change.
>
Sorry about that. I have identified the issue to be my text editor
config. I have fixed the issue on my end and I'll make sure to read the
git diff line by line for the next submission.
>> +/* set OSPM fan mode */
>> +
>> +static int pcc_pwm_fan_mode_set(int pwm_mode)
>> +{
>> + acpi_status status;
>> +
>> + union acpi_object param[1];
>> + struct acpi_object_list input;
>
> Don't leave empty lines in between variable declarations. Please use
> reverse-xmas tree order when you can (when no internal dependencies
> between local var don't force your hand).
>
I will go through and apply this to the entire patch.
>> +
>> + param[0].type = ACPI_TYPE_INTEGER;
>> + param[0].integer.value = pwm_mode;
>> + input.count = 1; /* takes one arg */
>
> Remove comment.
>
Will do
>> + input.pointer = param;
>> +
>> + status = acpi_evaluate_object(NULL, "\\_SB.PC00.LPCB.EC0.SEFM", &input,
>> + NULL);
>> + if (ACPI_FAILURE(status)) {
>> + pr_err("cannot set fan mode via SEFM\n");
>> + return -EIO;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +/* read PWM fan speed */
>
> This comments adds zero value over what the function name already tells
> us. Please don't add comments that state obvious things.
>
Will do
>> + /* get pwm speed */
>> + status = acpi_evaluate_object(NULL, "\\_SB.PC00.LPCB.EC0.TFN1._FST",
>> + NULL, &buffer);
>> + if (ACPI_FAILURE(status)) {
>> + pr_err("failed to get pwm speed\n");
>> + return -EIO;
>> + }
>> +
>> + union acpi_object *obj __free(kfree) = buffer.pointer;
>> +
>> + /* the structure should have 3 values */
>
> That's what can be easily read from the code. There's no need to comment
> trivialities like this.
>
Will do
>> +
>> +static int pcc_pwm_fan_hwmon_mode_set(struct pcc_acpi *pcc, long val)
>> +{
>> + switch (val) {
>> + case HWMON_PCC_FAN_PWM_AUTO:
>> + guard(mutex)(&pcc->pwm_fan_lock);
>
> I'm not sure if clang is happy with how scoping is here so these should
> have {} around each case.
>
Will add {} to each case
>> +
>> +static int pcc_pwm_fan_hwmon_write(struct device *dev,
>> + enum hwmon_sensor_types type, u32 attr,
>> + int channel, long val)
>> +{
>> + struct pcc_acpi *pcc;
>> +
>> + pcc = dev_get_drvdata(dev);
>
> And this is where I started to check whether you've ignored my earlier
> feedback. Turns out you sent a new version without addressing the
> feedback I've given you (and IIRC, it's not the first time this has
> happened).
>
> The next time this happens, I'll move this submission and its subsequent
> versions into a very low-priority bin to avoid wasting my time on it. So
> please triple check twice you've addressed every single comment I (or
> other potential reviewer) has given you on _any earlier version_ of the
> patch before even considering sending the next version. There's no hurry
> here, I won't be accepting half-baked patches so you'd just be wasting
> everyone's time by sending it over and over again with things unaddressed.
>
I sincerely apologize about this. I have made the mistake of applying
comments where it was pointed out instead of recognizing it as a pattern
to be applied to the entire patch in addition to repeating mistakes
pointed out in the previous replies.
I will go back to the very first version, cross-check every comment and
check it against the entire patch before sending a v8.
Thank you
prev parent reply other threads:[~2026-07-21 22:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260626054735.81BA51F00A3A@smtp.kernel.org>
2026-06-28 5:33 ` [RFC PATCH v6] platform/x86: panasonic-laptop: add fan speed mode for newer models Alex Yeo
2026-07-03 12:11 ` Ilpo Järvinen
2026-07-18 18:57 ` [RFC PATCH v7] " Alex Yeo
2026-07-20 13:46 ` Ilpo Järvinen
2026-07-20 14:41 ` Guenter Roeck
2026-07-21 23:22 ` Alex Yeo
2026-07-22 0:00 ` Guenter Roeck
2026-07-29 2:08 ` Alex Yeo
2026-07-21 22:10 ` Alex Yeo [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=bba0e7c6-e652-4dd8-a777-5e30dca810bf@gmail.com \
--to=alexyeo362@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kenneth.t.chan@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox