Skip to content

Commit c79de51

Browse files
author
Benjamin Tissoires
committed
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: Stephen Rothwell <[email protected]> Fixes: 9286675 ("HID: bpf: add HID-BPF hooks for hid_hw_output_report") Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 260ffc9 commit c79de51

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

drivers/hid/bpf/hid_bpf_dispatch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
115115
EXPORT_SYMBOL_GPL(dispatch_hid_bpf_raw_requests);
116116

117117
int dispatch_hid_bpf_output_report(struct hid_device *hdev,
118-
__u8 *buf, u32 size, __u64 source,
118+
__u8 *buf, u32 size, u64 source,
119119
bool from_bpf)
120120
{
121121
struct hid_bpf_ctx_kern ctx_kern = {

include/linux/hid_bpf.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ struct hid_bpf_ops {
138138
* It has the following arguments:
139139
*
140140
* ``ctx``: The HID-BPF context as &struct hid_bpf_ctx
141+
*
141142
* ``reportnum``: the report number, as in hid_hw_raw_request()
142143
*
143144
* ``rtype``: the report type (``HID_INPUT_REPORT``, ``HID_FEATURE_REPORT``,
@@ -165,16 +166,17 @@ struct hid_bpf_ops {
165166
* It has the following arguments:
166167
*
167168
* ``ctx``: The HID-BPF context as &struct hid_bpf_ctx
169+
*
168170
* ``source``: a u64 referring to a uniq but identifiable source. If %0, the
169-
* kernel itself emitted that call. For hidraw, ``source`` is set
170-
* to the associated ``struct file *``.
171+
* kernel itself emitted that call. For hidraw, ``source`` is set
172+
* to the associated ``struct file *``.
171173
*
172174
* Return: %0 to keep processing the request by hid-core; any other value
173175
* stops hid-core from processing that event. A positive value should be
174176
* returned with the number of bytes written to the device; a negative error
175177
* code interrupts the processing of this call.
176178
*/
177-
int (*hid_hw_output_report)(struct hid_bpf_ctx *ctx, __u64 source);
179+
int (*hid_hw_output_report)(struct hid_bpf_ctx *ctx, u64 source);
178180

179181

180182
/* private: do not show up in the docs */
@@ -203,9 +205,9 @@ int dispatch_hid_bpf_raw_requests(struct hid_device *hdev,
203205
unsigned char reportnum, __u8 *buf,
204206
u32 size, enum hid_report_type rtype,
205207
enum hid_class_request reqtype,
206-
__u64 source, bool from_bpf);
208+
u64 source, bool from_bpf);
207209
int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size,
208-
__u64 source, bool from_bpf);
210+
u64 source, bool from_bpf);
209211
int hid_bpf_connect_device(struct hid_device *hdev);
210212
void hid_bpf_disconnect_device(struct hid_device *hdev);
211213
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,
221223
enum hid_class_request reqtype,
222224
u64 source, bool from_bpf) { return 0; }
223225
static inline int dispatch_hid_bpf_output_report(struct hid_device *hdev, __u8 *buf, u32 size,
224-
__u64 source, bool from_bpf) { return 0; }
226+
u64 source, bool from_bpf) { return 0; }
225227
static inline int hid_bpf_connect_device(struct hid_device *hdev) { return 0; }
226228
static inline void hid_bpf_disconnect_device(struct hid_device *hdev) {}
227229
static inline void hid_bpf_destroy_device(struct hid_device *hid) {}

0 commit comments

Comments
 (0)