All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Fix a 'unused function' compilation error
Date: Thu, 11 Jan 2024 21:29:01 -0800	[thread overview]
Message-ID: <2c6fb29f-0256-4dec-a7d4-ce7bc24f091b@linux.dev> (raw)
In-Reply-To: <CAADnVQLH66gFbyqekSEbpzc+CRYkbMxcCAtBvMcCJo+8tfauqg@mail.gmail.com>


On 1/11/24 8:59 PM, Alexei Starovoitov wrote:
> On Thu, Jan 11, 2024 at 8:17 PM Yonghong Song <yonghong.song@linux.dev> wrote:
>> Building the kernel with latest llvm18, I hit the following error:
>>
>>   /home/yhs/work/bpf-next/kernel/bpf/verifier.c:4383:13: error: unused function '__is_scalar_unbounded' [-Werror,-Wunused-function]
>>    4383 | static bool __is_scalar_unbounded(struct bpf_reg_state *reg)
>>         |             ^~~~~~~~~~~~~~~~~~~~~
>>   1 error generated.
>>
>> Patches [1] and [2] are in the same patch set. Patch [1] removed
>> the usage of __is_scalar_unbounded(), and patch [2] re-introduced
>> the usage of the function. Currently patch [1] is merged into
>> bpf-next while patch [2] does not, hence the above compilation
>> error is triggered.
>>
>> To fix the compilation failure, let us temporarily make
>> __is_scalar_unbounded() not accessible through macro '#if 0'.
>> It can be re-introduced later when [2] is ready to merge.
>>
>>    [1] https://lore.kernel.org/bpf/20240108205209.838365-11-maxtram95@gmail.com/
>>    [2] https://lore.kernel.org/bpf/20240108205209.838365-15-maxtram95@gmail.com/
> Ouch. Sorry. This interaction between patches was unexpected.
> Instead of this particular if 0 patch, is there a way to amend pushed
> patches to avoid this issue?

Another option is that in merged patch [1] removing the function __is_scalar_unbounded().
And the function can be re-introduced later if needed.


  reply	other threads:[~2024-01-12  5:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  4:16 [PATCH bpf-next] bpf: Fix a 'unused function' compilation error Yonghong Song
2024-01-12  4:59 ` Alexei Starovoitov
2024-01-12  5:29   ` Yonghong Song [this message]
2024-01-12  6:02     ` Alexei Starovoitov

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=2c6fb29f-0256-4dec-a7d4-ce7bc24f091b@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=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.