lkml.org 
[lkml]   [2023]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectre: LoongArch: Add BPF JIT support
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

\
 
 \ /
  Last update: 2023-07-24 14:28    [W:0.031 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site