Linux Input/HID development
 help / color / mirror / Atom feed
From: Maoyi Xie via B4 Relay <devnull+maoyixie.tju.gmail.com@kernel.org>
To: Jiri Kosina <jikos@kernel.org>,
	 Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Maoyi Xie <maoyixie.tju@gmail.com>,
	linux-input@vger.kernel.org,
	 Benjamin Tissoires <bentiss@kernel.org>,
	Zhang Lixu <lixu.zhang@intel.com>
Subject: [PATCH v3 0/2] HID: intel-ish-hid: Size the buffers for a later, larger response
Date: Sun, 06 Dec 2026 00:07:02 +0800	[thread overview]
Message-ID: <20261206-ishtp-hid-buffers-v3-0-1dff00637cb7@gmail.com> (raw)

Both patches fix buffers in process_recv() that are allocated for the
first firmware response and then reused for later, larger ones.

Patch 2 now allocates MAX_HID_DEVICES entries. A count above
MAX_HID_DEVICES is left to the pending patch [1].

The series is now based on hid.git for-next. On for-7.4/upstream-fixes,
patch 2 conflicts with the older devm_kcalloc() call. I can send a
version for that branch if you prefer.

I used an LLM to help write the harness and these patches.

Changes in v3:
- Patch 1 is unchanged except for the tags from Zhang Lixu and
  Srinivas Pandruvada.
- Patch 2 uses MAX_HID_DEVICES instead of U8_MAX, as Zhang Lixu
  suggested.

v2: https://lore.kernel.org/linux-input/20261125090633.1385386-1-maoyixie.tju@gmail.com/
v1: https://lore.kernel.org/linux-input/20261123092816.2200718-1-maoyixie.tju@gmail.com/

[1] https://lore.kernel.org/all/tencent_130404E5ABECE66E8D0E70D8E6892C751C0A@qq.com/

---
Maoyi Xie (2):
      HID: intel-ish-hid: Reallocate the descriptor buffers for a longer response
      HID: intel-ish-hid: Allocate hid_devices for MAX_HID_DEVICES entries

 drivers/hid/intel-ish-hid/ishtp-hid-client.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)
---
base-commit: 47d0d5ce3cfca63a04eabcbeef7086d06240ff97
change-id: 20261205-ishtp-hid-buffers-868d94ab6e81

Best regards,
-- 
Maoyi Xie <maoyixie.tju@gmail.com>



             reply	other threads:[~2026-12-05 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 16:07 Maoyi Xie via B4 Relay [this message]
2026-12-05 16:07 ` [PATCH v3 1/2] HID: intel-ish-hid: Reallocate the descriptor buffers for a longer response Maoyi Xie via B4 Relay
2026-12-05 16:07 ` [PATCH v3 2/2] HID: intel-ish-hid: Allocate hid_devices for MAX_HID_DEVICES entries Maoyi Xie via B4 Relay

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=20261206-ishtp-hid-buffers-v3-0-1dff00637cb7@gmail.com \
    --to=devnull+maoyixie.tju.gmail.com@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    --cc=maoyixie.tju@gmail.com \
    --cc=srinivas.pandruvada@linux.intel.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