All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kurt Borja" <kuurtb@gmail.com>
To: "Wentao Liang" <vulab@iscas.ac.cn>, <hmh@hmh.eng.br>,
	<hdegoede@redhat.com>, <ilpo.jarvinen@linux.intel.com>
Cc: <ibm-acpi-devel@lists.sourceforge.net>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH v3] platform/x86: thinkpad-acpi: Add error check for tpacpi_check_quirks
Date: Tue, 08 Apr 2025 02:08:45 -0300	[thread overview]
Message-ID: <D90ZXBE1FIMF.2DV3D7QERNFMR@gmail.com> (raw)
In-Reply-To: <20250408013950.2634-1-vulab@iscas.ac.cn>

Hi Wentao,

On Mon Apr 7, 2025 at 10:39 PM -03, Wentao Liang wrote:
> In tpacpi_battery_init(), the return value of tpacpi_check_quirks() needs
> to be checked. The battery should not be hooked if there is no matched
> battery information in quirk table.

Why is this the case? What problem is this fixing?

It seems only a few devices are listed in battery_quirk_table, and the
comment above it suggests it is just a fixup:

	/*
	 * Individual addressing is broken on models that expose the
	 * primary battery as BAT1.
	 */

Furthermore, I looked at uses of this quirk in the code and it's absence
doesn't seem critical.

>
> Add an error check and return -ENODEV immediately if the device fail
> the check.

I bring this up because it has the potential to cause a regression on a
lot of devices.

-- 
 ~ Kurt

      reply	other threads:[~2025-04-08  5:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08  1:39 [PATCH v3] platform/x86: thinkpad-acpi: Add error check for tpacpi_check_quirks Wentao Liang
2025-04-08  5:08 ` Kurt Borja [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=D90ZXBE1FIMF.2DV3D7QERNFMR@gmail.com \
    --to=kuurtb@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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.