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

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Fix doxygen comments for dynptr slice kfuncs

In commit 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and
bpf_dynptr_slice_rdwr"), the bpf_dynptr_slice() and
bpf_dynptr_slice_rdwr() kfuncs were added to BPF. These kfuncs included
doxygen headers, but unfortunately those headers are not properly
formatted according to [0], and causes the following warnings during the
docs build:

./kernel/bpf/helpers.c:2225: warning: \
Excess function parameter 'returns' description in 'bpf_dynptr_slice'
./kernel/bpf/helpers.c:2303: warning: \
Excess function parameter 'returns' description in 'bpf_dynptr_slice_rdwr'
...

This patch fixes those doxygen comments.

[0]: https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation

Fixes: 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr")
Signed-off-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20230301194910.602738-1-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

David Vernet and committed by
Alexei Starovoitov
7ce60b11 d69b5a90

+14 -16
+14 -16
kernel/bpf/helpers.c
··· 2194 2194 } 2195 2195 2196 2196 /** 2197 - * bpf_dynptr_slice - Obtain a read-only pointer to the dynptr data. 2197 + * bpf_dynptr_slice() - Obtain a read-only pointer to the dynptr data. 2198 + * @ptr: The dynptr whose data slice to retrieve 2199 + * @offset: Offset into the dynptr 2200 + * @buffer: User-provided buffer to copy contents into 2201 + * @buffer__szk: Size (in bytes) of the buffer. This is the length of the 2202 + * requested slice. This must be a constant. 2198 2203 * 2199 2204 * For non-skb and non-xdp type dynptrs, there is no difference between 2200 2205 * bpf_dynptr_slice and bpf_dynptr_data. ··· 2214 2209 * bpf_dynptr_slice will not invalidate any ctx->data/data_end pointers in 2215 2210 * the bpf program. 2216 2211 * 2217 - * @ptr: The dynptr whose data slice to retrieve 2218 - * @offset: Offset into the dynptr 2219 - * @buffer: User-provided buffer to copy contents into 2220 - * @buffer__szk: Size (in bytes) of the buffer. This is the length of the 2221 - * requested slice. This must be a constant. 2222 - * 2223 - * @returns: NULL if the call failed (eg invalid dynptr), pointer to a read-only 2212 + * Return: NULL if the call failed (eg invalid dynptr), pointer to a read-only 2224 2213 * data slice (can be either direct pointer to the data or a pointer to the user 2225 2214 * provided buffer, with its contents containing the data, if unable to obtain 2226 2215 * direct pointer) ··· 2257 2258 } 2258 2259 2259 2260 /** 2260 - * bpf_dynptr_slice_rdwr - Obtain a writable pointer to the dynptr data. 2261 + * bpf_dynptr_slice_rdwr() - Obtain a writable pointer to the dynptr data. 2262 + * @ptr: The dynptr whose data slice to retrieve 2263 + * @offset: Offset into the dynptr 2264 + * @buffer: User-provided buffer to copy contents into 2265 + * @buffer__szk: Size (in bytes) of the buffer. This is the length of the 2266 + * requested slice. This must be a constant. 2261 2267 * 2262 2268 * For non-skb and non-xdp type dynptrs, there is no difference between 2263 2269 * bpf_dynptr_slice and bpf_dynptr_data. ··· 2291 2287 * bpf_dynptr_slice_rdwr will not invalidate any ctx->data/data_end pointers in 2292 2288 * the bpf program. 2293 2289 * 2294 - * @ptr: The dynptr whose data slice to retrieve 2295 - * @offset: Offset into the dynptr 2296 - * @buffer: User-provided buffer to copy contents into 2297 - * @buffer__szk: Size (in bytes) of the buffer. This is the length of the 2298 - * requested slice. This must be a constant. 2299 - * 2300 - * @returns: NULL if the call failed (eg invalid dynptr), pointer to a 2290 + * Return: NULL if the call failed (eg invalid dynptr), pointer to a 2301 2291 * data slice (can be either direct pointer to the data or a pointer to the user 2302 2292 * provided buffer, with its contents containing the data, if unable to obtain 2303 2293 * direct pointer)