Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Menglong Dong <menglong.dong@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: "Varun R Mallya" <varunrmallya@gmail.com>,
	"Andrii Nakryiko" <andrii@kernel.org>, Eduard <eddyz87@gmail.com>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Song Liu" <song@kernel.org>, bpf <bpf@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: Fix const qualifier warning in fexit_bpf2bpf.c
Date: Fri, 06 Mar 2026 10:47:59 +0800	[thread overview]
Message-ID: <13961058.uLZWGnKmhe@7940hx> (raw)
In-Reply-To: <CAADnVQ+gA+4UHjz8BvN7fSRehZ9c0vdYGVJ4e01ecat3beCwAQ@mail.gmail.com>

On 2026/3/6 10:26 Alexei Starovoitov <alexei.starovoitov@gmail.com> write:
> On Thu, Mar 5, 2026 at 5:40 PM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> >
> > On Thu, Mar 5, 2026 at 5:16 PM Menglong Dong <menglong.dong@linux.dev> wrote:
> > >
> > > On 2026/3/6 06:21 Varun R Mallya <varunrmallya@gmail.com> write:
> > > > Building selftests with
> > > > clang 23.0.0 (6fae863eba8a72cdd82f37e7111a46a70be525e0) triggers
> > > > the following error:
> > > >
> > > >   tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c:117:12:
> > > >   error: assigning to 'char *' from 'const char *' discards qualifiers
> > > >   [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
> > > >
> > > > The variable `tgt_name` is declared as `char *`, but it stores the
> > > > result of strstr(prog_name[i], "/"). Since `prog_name[i]` is a
> > > > `const char *`, the returned pointer should also be treated as
> > > > const-qualified.
> > > >
> > > > Update `tgt_name` to `const char *` to match the type of the underlying
> > > > string and silence the compiler warning.
> > > >
> > > > Signed-off-by: Varun R Mallya <varunrmallya@gmail.com>
> > > > ---
> > > >  tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
> > > > index 23d933f1aec6..92c20803ea76 100644
> > > > --- a/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
> > > > +++ b/tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
> > > > @@ -111,7 +111,7 @@ static void test_fexit_bpf2bpf_common(const char *obj_file,
> > > >               struct bpf_link_info link_info;
> > > >               struct bpf_program *pos;
> > > >               const char *pos_sec_name;
> > > > -             char *tgt_name;
> > > > +             const char *tgt_name;
> > >
> > > I have been suffering from this build error too. So,
> > >
> > > Acked-by: Menglong Dong <menglong.dong@linux.dev>
> >
> > Looks like this patch was lost. Pls resend.
> 
> Ohh. I see it now. Your reply got delivered before the patch itself
> and the patch went to spam.
> No need to resend.

Okay!




  reply	other threads:[~2026-03-06  2:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-05 22:21 [PATCH bpf-next] selftests/bpf: Fix const qualifier warning in fexit_bpf2bpf.c Varun R Mallya
2026-03-06  1:16 ` Menglong Dong
2026-03-06  1:40   ` Alexei Starovoitov
2026-03-06  2:26     ` Alexei Starovoitov
2026-03-06  2:47       ` Menglong Dong [this message]
2026-03-06 12:11 ` Varun R Mallya
2026-03-11 18:20 ` 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=13961058.uLZWGnKmhe@7940hx \
    --to=menglong.dong@linux.dev \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=toke@redhat.com \
    --cc=varunrmallya@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