Re: [PATCH 1/4] selftests/hid: fix compilation when bpf_wq and hid_device are not exported

From: Jiri Kosina

Date: Fri Mar 13 2026 - 11:59:51 EST


On Fri, 13 Mar 2026, Benjamin Tissoires wrote:

> This can happen in situations when CONFIG_HID_SUPPORT is set to no, or
> some complex situations where struct bpf_wq is not exported.
>
> So do the usual dance of hiding them before including vmlinux.h, and
> then redefining them and make use of CO-RE to have the correct offsets.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202603111558.KLCIxsZB-lkp@xxxxxxxxx/
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Benjamin Tissoires <bentiss@xxxxxxxxxx>

Acked-by: Jiri Kosina <jkosina@xxxxxxxx>

--
Jiri Kosina
SUSE Labs