From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Youling Tang <tangyouling@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
loongarch@lists.linux.dev,
"bpf@vger.kernel.org >> bpf" <bpf@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: LoongArch: Add BPF JIT support
Date: Mon, 24 Jul 2023 13:27:26 +0100 [thread overview]
Message-ID: <bcf97046-e336-712a-ac68-7fd194f2953e@gmail.com> (raw)
Hi,
Static analysis with clang scan build on arch/loongarch/net/bpf_jit.h
has detected a potential issue with the following commit:
commit 5dc615520c4dfb358245680f1904bad61116648e
Author: Tiezhu Yang <yangtiezhu@loongson.cn>
Date: Wed Oct 12 16:36:20 2022 +0800
LoongArch: Add BPF JIT support
This issue is as follows:
arch/loongarch/net/bpf_jit.h:153:23: warning: Logical disjunction always
evaluates to true: imm_51_31 != 0 || imm_51_31 != 0x1fffff.
[incorrectLogicOperator]
if (imm_51_31 != 0 || imm_51_31 != 0x1fffff) {
The statement seems to be always true. I suspect it should it be instead:
if (imm_51_31 != 0 && imm_51_31 != 0x1fffff) {
regards,
Colin
next reply other threads:[~2023-07-24 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 12:27 Colin King (gmail) [this message]
2023-07-25 0:52 ` Tiezhu Yang
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=bcf97046-e336-712a-ac68-7fd194f2953e@gmail.com \
--to=colin.i.king@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=tangyouling@loongson.cn \
--cc=yangtiezhu@loongson.cn \
/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
all inboxes | Powered by JetHome®