Commit c79de517 authored by Benjamin Tissoires's avatar Benjamin Tissoires

HID: bpf: doc fixes for hid_hw_request() hooks

We had the following errors while doing make htmldocs:

Documentation/hid/hid-bpf:185: include/linux/hid_bpf.h:167:
	ERROR: Unexpected indentation.

Also ensure consistency with the rest of the __u64 vs u64.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Fixes: 9286675a ("HID: bpf: add HID-BPF hooks for hid_hw_output_report")
Link: https://patch.msgid.link/20240701-fix-cki-v2-4-20564e2e1393@kernel.orgSigned-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent 260ffc96
...@@ -115,7 +115,7 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev, ...@@ -115,7 +115,7 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_raw_requests); EXPORT_SYMBOL_GPL(dispatch_hid_bpf_raw_requests);
int dispatch_hid_bpf_output_report(struct hid_device *hdev, int dispatch_hid_bpf_output_report(struct hid_device *hdev,
__u8 *buf, u32 size, __u64 source, __u8 *buf, u32 size, u64 source,
bool from_bpf) bool from_bpf)
{ {
struct hid_bpf_ctx_kern ctx_kern = { struct hid_bpf_ctx_kern ctx_kern = {
......
...@@ -138,6 +138,7 @@ struct hid_bpf_ops { ...@@ -138,6 +138,7 @@ struct hid_bpf_ops {
* It has the following arguments: * It has the following arguments:
* *
* ``ctx``: The HID-BPF context as &struct hid_bpf_ctx * ``ctx``: The HID-BPF context as &struct hid_bpf_ctx
*
* ``reportnum``: the report number, as in hid_hw_raw_request() * ``reportnum``: the report number, as in hid_hw_raw_request()
* *
* ``rtype``: the report type (``HID_INPUT_REPORT``, ``HID_FEATURE_REPORT``, * ``rtype``: the report type (``HID_INPUT_REPORT``, ``HID_FEATURE_REPORT``,
...@@ -165,6 +166,7 @@ struct hid_bpf_ops { ...@@ -165,6 +166,7 @@ struct hid_bpf_ops {
* It has the following arguments: * It has the following arguments:
* *
* ``ctx``: The HID-BPF context as &struct hid_bpf_ctx * ``ctx``: The HID-BPF context as &struct hid_bpf_ctx
*
* ``source``: a u64 referring to a uniq but identifiable source. If %0, the * ``source``: a u64 referring to a uniq but identifiable source. If %0, the
* kernel itself emitted that call. For hidraw, ``source`` is set * kernel itself emitted that call. For hidraw, ``source`` is set
* to the associated ``struct file *``. * to the associated ``struct file *``.
...@@ -174,7 +176,7 @@ struct hid_bpf_ops { ...@@ -174,7 +176,7 @@ struct hid_bpf_ops {
* returned with the number of bytes written to the device; a negative error * returned with the number of bytes written to the device; a negative error
* code interrupts the processing of this call. * code interrupts the processing of this call.
*/ */
int (*hid_hw_output_report)(struct hid_bpf_ctx *ctx, __u64 source); int (*hid_hw_output_report)(struct hid_bpf_ctx *ctx, u64 source);
/* private: do not show up in the docs */ /* private: do not show up in the docs */
...@@ -203,9 +205,9 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev, ...@@ -203,9 +205,9 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
unsigned char reportnum, __u8 *buf, unsigned char reportnum, __u8 *buf,
u32 size, enum hid_report_type rtype, u32 size, enum hid_report_type rtype,
enum hid_class_request reqtype, enum hid_class_request reqtype,
__u64 source, bool from_bpf); u64 source, bool from_bpf);
int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size, int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size,
__u64 source, bool from_bpf); u64 source, bool from_bpf);
int hid_bpf_connect_device(struct hid_device *hdev); int hid_bpf_connect_device(struct hid_device *hdev);
void hid_bpf_disconnect_device(struct hid_device *hdev); void hid_bpf_disconnect_device(struct hid_device *hdev);
void hid_bpf_destroy_device(struct hid_device *hid); void hid_bpf_destroy_device(struct hid_device *hid);
...@@ -221,7 +223,7 @@ static inline int dispatch_hid_bpf_raw_requests(struct hid_device *hdev, ...@@ -221,7 +223,7 @@ static inline int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
enum hid_class_request reqtype, enum hid_class_request reqtype,
u64 source, bool from_bpf) { return 0; } u64 source, bool from_bpf) { return 0; }
static inline int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size, static inline int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size,
__u64 source, bool from_bpf) { return 0; } u64 source, bool from_bpf) { return 0; }
static inline int hid_bpf_connect_device(struct hid_device *hdev) { return 0; } static inline int hid_bpf_connect_device(struct hid_device *hdev) { return 0; }
static inline void hid_bpf_disconnect_device(struct hid_device *hdev) {} static inline void hid_bpf_disconnect_device(struct hid_device *hdev) {}
static inline void hid_bpf_destroy_device(struct hid_device *hid) {} static inline void hid_bpf_destroy_device(struct hid_device *hid) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment