From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Tom Hu" <huxiaoying@kylinos.cn>,
linux-kernel@vger.kernel.org,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>, "Rong Zhang" <i@rong.moe>
Cc: "Henrique de Moraes Holschuh" <hmh@hmh.eng.br>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
xiaoying_hu@126.com
Subject: Re: [PATCH 2/2] platform/x86: thinkpad_acpi: Only check charge_start against a known charge_stop
Date: Wed, 25 Nov 2026 12:05:02 -0500 [thread overview]
Message-ID: <49ade1c5-073e-40c5-b163-6866d051bfca@app.fastmail.com> (raw)
In-Reply-To: <20261125125252.38003-1-huxiaoying@kylinos.cn>
On Wed, Nov 25, 2026, at 7:52 AM, Tom Hu wrote:
> Hi Rong, Mark,
>
> Thanks for the reviews.
>
> On 2026-11-24, Rong Zhang wrote:
>> A random thought: perhaps initializing charge_stop with 100 could make
>> the code cleaner?
> Good idea, Since charge_start is already limited to [0, 99] earlier in
> the
> store path, defaulting charge_stop to 100 when GET_STOP is not
> available makes
> the existing `value > charge_stop` check a no-op for such machines, and
> the extra
> stop_support condition is not needed.
>
> The v2 I'm about to send.
>
>
> On 2026-11-24, Mark Pearson wrote:
>> Have you seen this happen on any actual HW?
> Not on hardware I have access to; I agree a firmware exposing
> GET_START but not GET_STOP
> is unusual, so the patch is mostly hardening, but the current behaviour
> (rejecting every charge_start > 0)
> is wrong either way, so I think it is worth fixing.
>
Yep - just wanted to check. I'd go and ask the FW to be fixed if it was being seen on real HW ;)
Mark
next prev parent reply other threads:[~2026-11-25 17:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 10:39 [PATCH 1/2] platform/x86: thinkpad_acpi: Update charge_stop only after it was applied Tom Hu
2026-11-24 10:39 ` [PATCH 2/2] platform/x86: thinkpad_acpi: Only check charge_start against a known charge_stop Tom Hu
2026-11-24 14:02 ` Rong Zhang
2026-11-24 18:00 ` Mark Pearson
2026-11-25 12:52 ` Tom Hu
2026-11-25 12:52 ` [PATCH v2 1/2] platform/x86: thinkpad_acpi: Update charge_stop only after it was applied Tom Hu
2026-11-25 14:09 ` Rong Zhang
2026-11-25 12:52 ` [PATCH v2 2/2] platform/x86: thinkpad_acpi: Default charge_stop to 100 when unsupported Tom Hu
2026-11-25 14:10 ` Rong Zhang
2026-11-25 17:05 ` Mark Pearson [this message]
2026-11-24 14:02 ` [PATCH 1/2] platform/x86: thinkpad_acpi: Update charge_stop only after it was applied Rong Zhang
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=49ade1c5-073e-40c5-b163-6866d051bfca@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=hmh@hmh.eng.br \
--cc=huxiaoying@kylinos.cn \
--cc=i@rong.moe \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=xiaoying_hu@126.com \
/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®