public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: thinker.li@gmail.com, bpf@vger.kernel.org, ast@kernel.org,
	martin.lau@linux.dev, song@kernel.org, kernel-team@meta.com,
	andrii@kernel.org
Cc: sinquersw@gmail.com, kuifeng@meta.com,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Subject: Re: [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf().
Date: Thu, 3 Aug 2023 18:41:53 -0700	[thread overview]
Message-ID: <38f076e4-908f-d1be-a3f6-4b276d5cd6bd@linux.dev> (raw)
In-Reply-To: <20230804005101.1534505-1-thinker.li@gmail.com>



On 8/3/23 5:51 PM, thinker.li@gmail.com wrote:
> From: Kui-Feng Lee <thinker.li@gmail.com>
> 
> 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 <alexei.starovoitov@gmail.com>
> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>

Looks like a fix tag is not needed as the old code won't cause
compilation warnings or runtime errors despite the signature mismatch.

Acked-by: Yonghong Song <yonghong.song@linux.dev>

> ---
>   include/linux/filter.h | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/filter.h b/include/linux/filter.h
> index 2d6fe30bad5f..761af6b3cf2b 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 */
>   

  reply	other threads:[~2023-08-04  1:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  0:51 [PATCH bpf-next] bpf: fix inconsistent return types of bpf_xdp_copy_buf() thinker.li
2023-08-04  1:41 ` Yonghong Song [this message]
2023-08-04 17:25   ` Kui-Feng Lee
2023-08-04 21:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38f076e4-908f-d1be-a3f6-4b276d5cd6bd@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=sinquersw@gmail.com \
    --cc=song@kernel.org \
    --cc=thinker.li@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox