From: Jiri Slaby (SUSE) Date: Thu, 1 Feb 2024 11:53:16 +0000 (+0100) Subject: HID: protect hid_device::bpf by CONFIG_HID_BPF X-Git-Tag: v6.9-rc1~124^2~1^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed94a8f8ca75ea0f607c919edf2ed5a5e707ef44;p=thirdparty%2Fkernel%2Flinux.git HID: protect hid_device::bpf by CONFIG_HID_BPF And not by CONFIG_BPF. BPF can be selected while HID_BPF does not have to. It actually cannot be on some platforms due to Kconfig dependences. This saves quite some bytes on those setups. Found by https://github.com/jirislaby/clang-struct. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: Benjamin Tissoires Signed-off-by: Jiri Kosina --- diff --git a/include/linux/hid.h b/include/linux/hid.h index 7c26db874ff03..b12cb1c8e6821 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -683,9 +683,9 @@ struct hid_device { /* device report descriptor */ unsigned int id; /* system unique id */ -#ifdef CONFIG_BPF +#ifdef CONFIG_HID_BPF struct hid_bpf bpf; /* hid-bpf data */ -#endif /* CONFIG_BPF */ +#endif /* CONFIG_HID_BPF */ }; void hiddev_free(struct kref *ref);