mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gladyshev Ilya <foxido@foxido.dev>
To: Armin Wolf <W_Armin@gmx.de>
Cc: linux-input@vger.kernel.org, nikita.nikita.krasnov@gmail.com,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2] platform/x86: Add WMI driver for Redmibook keyboard.
Date: Wed, 30 Jul 2025 20:37:12 +0300	[thread overview]
Message-ID: <26cdd07b-7b5c-4636-99c2-6c078c6a48bc@foxido.dev> (raw)
In-Reply-To: <8e7f2cde-f068-4696-8298-f83619dfaf76@gmx.de>

Thx for review

On 7/30/25 19:33, Armin Wolf wrote:
>> +
>> +    if (obj->type != ACPI_TYPE_BUFFER) {
>> +        dev_err(&wdev->dev, "Bad response type %u\n", obj->type);
>> +        return;
>> +    }
>> +
>> +    if (obj->buffer.length != 32) {
> 
> Please also accept oversized buffers.
>
Sorry if this is a stupid question, but isn't any size other than 32 a 
sign of a firmware bug?

>> +
>> +    /* AI key quirk */
>> +    if (entry->keycode == KEY_ASSISTANT) {
>> +        value = !(payload & AI_KEY_VALUE_MASK);
> 
> I would rather check the payload for 0x00011901 here.
Personally I prefer to think about it as "some value encoded in payload" 
rather than "is it AI button release payload?", because in the latter 
case alternatives are more unclear. It's just a preference, btw, would 
fix if you insist.

--
Gladyshev Ilya

  reply	other threads:[~2025-07-30 17:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 19:05 Gladyshev Ilya
2025-07-30 16:33 ` Armin Wolf
2025-07-30 17:37   ` Gladyshev Ilya [this message]
2025-07-30 17:52     ` Armin Wolf
2025-08-05 19:42 ` Dmitry Torokhov
2025-08-11 21:23   ` foxidokun

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=26cdd07b-7b5c-4636-99c2-6c078c6a48bc@foxido.dev \
    --to=foxido@foxido.dev \
    --cc=W_Armin@gmx.de \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita.nikita.krasnov@gmail.com \
    --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

all inboxes | Powered by JetHome®