From: Kui-Feng Lee Date: Fri, 4 Aug 2023 00:51:01 +0000 (-0700) Subject: bpf: fix inconsistent return types of bpf_xdp_copy_buf(). X-Git-Tag: v6.6-rc1~162^2~157^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a60a041eada0fbfdc7b6b7a10fdf68ae6a840ce;p=thirdparty%2Flinux.git bpf: fix inconsistent return types of bpf_xdp_copy_buf(). Fix inconsistent return types in two implementations of bpf_xdp_copy_buf(). There are two implementations: one is an empty implementation whose return type does not match the actual implementation. Suggested-by: Alexei Starovoitov Signed-off-by: Kui-Feng Lee Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20230804005101.1534505-1-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau --- diff --git a/include/linux/filter.h b/include/linux/filter.h index 2d6fe30bad5f1..761af6b3cf2bc 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -1572,10 +1572,9 @@ static inline void *bpf_xdp_pointer(struct xdp_buff *xdp, u32 offset, u32 len) return NULL; } -static inline void *bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf, - unsigned long len, bool flush) +static inline void bpf_xdp_copy_buf(struct xdp_buff *xdp, unsigned long off, void *buf, + unsigned long len, bool flush) { - return NULL; } #endif /* CONFIG_NET */