Re: [PATCH 0/5] HID: hidraw: Encapsulate struct hidraw and make hidraw.h private

From: Benjamin Tissoires

Date: Fri Oct 16 2026 - 06:26:03 EST


Hi Dmitry,

On Oct 13 2026, Dmitry Torokhov wrote:
> This series cleans up internal HID core and hidraw header boundaries.
>
> First, internal HID core declarations and unused symbol exports are
> moved out of include/linux/hid.h into a private drivers/hid/hid-core.h
> header. Next, a hidraw_instance() accessor is introduced in
> include/linux/hidraw.h so HID drivers that only need the hidraw minor
> number for naming or debug logging no longer dereference struct hidraw
> directly. After converting the drivers and dropping unused
> linux/hidraw.h includes, hidraw.h is moved to drivers/hid/hidraw.h and
> struct hidraw along with its internal buffer and list structures are
> made private to drivers/hid/hidraw.c.

Series looks good to me. However I have a couple of hiccups:
- the series doesn't apply cleanly on v7.3 (conflict in
include/linux/hid.h, which seems 7.2 based), and also not on v7.2
(conflict in 2/5 this time around)
- Jinmo kind of hijacked the series, and now b4 thinks 1/6 is Jinmo's patch.

Would you mind respinning it on top of 7.3-rc7 or hid.git/for-next?

Cheers,
Benjamin

>
> Dmitry Torokhov (5):
> HID: core: Move internal declarations and drop unused exports
> HID: hidraw: Introduce hidraw_instance() helper
> HID: Use hidraw_instance() in drivers
> HID: Drop unused linux/hidraw.h includes
> HID: hidraw: Make hidraw.h private to HID subsystem
>
> drivers/hid/Kconfig | 3 ++
> drivers/hid/hid-core.c | 7 ++--
> drivers/hid/hid-core.h | 20 +++++++++++
> drivers/hid/hid-cp2112.c | 15 ++++----
> drivers/hid/hid-ft260.c | 2 +-
> drivers/hid/hid-input.c | 4 +--
> drivers/hid/hid-led.c | 10 ++++--
> drivers/hid/hid-mcp2200.c | 1 -
> drivers/hid/hid-mcp2221.c | 1 -
> drivers/hid/hid-quirks.c | 1 +
> drivers/hid/hid-u2fzero.c | 10 ++++--
> drivers/hid/hid-winwing.c | 1 -
> drivers/hid/hidraw.c | 48 ++++++++++++++++++++++---
> {include/linux => drivers/hid}/hidraw.h | 32 +++--------------
> drivers/hid/usbhid/hid-core.c | 1 -
> include/linux/hid.h | 8 -----
> net/bluetooth/hidp/core.c | 1 -
> 17 files changed, 100 insertions(+), 65 deletions(-)
> create mode 100644 drivers/hid/hid-core.h
> rename {include/linux => drivers/hid}/hidraw.h (58%)
>
> --
> 2.56.0.385.gd3acb90ef8-goog
>