Skip to contentSkip to conversation

bpf: fix bpf_ringbuf_output() signature to return long

PATCH Applied Andrii Nakryiko 3 participants 3 messages Jul 27, 2020 – Jul 28, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf: fix bpf_ringbuf_output() signature to return long

Due to bpf tree fix merge, bpf_ringbuf_output() signature ended up with int as a return type, while all other helpers got converted to returning long. So fix it in bpf-next now.

Fixes b0659d8a950d ("bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments")
---
 include/uapi/linux/bpf.h       | 2 +-
 tools/include/uapi/linux/bpf.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/bpf.h +1 -1
index e1ba4ae6a916..eb5e0c38eb2c 100644
@@ -3241,7 +3241,7 @@ union bpf_attr {
  *	Return
  *		The id is returned or 0 in case the id could not be retrieved.
  *
- * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ * long bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
  * 	Description
  * 		Copy *size* bytes from *data* into a ring buffer *ringbuf*.
  * 		If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
tools/include/uapi/linux/bpf.h +1 -1
index e1ba4ae6a916..eb5e0c38eb2c 100644
@@ -3241,7 +3241,7 @@ union bpf_attr {
  *	Return
  *		The id is returned or 0 in case the id could not be retrieved.
  *
- * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ * long bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
  * 	Description
  * 		Copy *size* bytes from *data* into a ring buffer *ringbuf*.
  * 		If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
Signature · 1 line
2.24.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Andrii Nakryiko

Due to bpf tree fix merge, bpf_ringbuf_output() signature ended up with int as a return type, while all other helpers got converted to returning long. So fix it in bpf-next now.

Fixes b0659d8a950d ("bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments")
maintainer Applied
#2 lore raw
In reply to Andrii Nakryiko
Quoted 6 lines · Andrii Nakryiko

Due to bpf tree fix merge, bpf_ringbuf_output() signature ended up with int as a return type, while all other helpers got converted to returning long. So fix it in bpf-next now.

Fixes b0659d8a950d ("bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments")

Applied, thanks!