Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: bpf: move the BIT() macro to hid_bpf_helpers.h

This macro can be useful in mopre than one place

Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/commit/7970a9c17aa0756bad63e89fccb6ee4f2ec83ccc
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patch.msgid.link/20240627-import-bpf-v1-3-0dbcda4a5b1f@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

+1 -2
-2
drivers/hid/bpf/progs/XPPen__Artist24.bpf.c
··· 78 78 0xc0, // End Collection 106 79 79 }; 80 80 81 - #define BIT(n) (1UL << n) 82 - 83 81 #define TIP_SWITCH BIT(0) 84 82 #define BARREL_SWITCH BIT(1) 85 83 #define ERASER BIT(2)
+1
drivers/hid/bpf/progs/hid_bpf_helpers.h
··· 66 66 #define HID_VID_ANY 0x0000 67 67 #define HID_PID_ANY 0x0000 68 68 69 + #define BIT(n) (1UL << (n)) 69 70 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) 70 71 71 72 /* Helper macro to convert (foo, __LINE__) into foo134 so we can use __LINE__ for