* [PATCH] bpf: Simplify bool comparison
@ 2021-02-08 9:43 Jiapeng Chong
2021-02-09 2:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-02-08 9:43 UTC (permalink / raw)
To: ast
Cc: daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh, netdev, bpf, linux-kernel, Jiapeng Chong
Fix the following coccicheck warning:
./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
tools/bpf/bpf_dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpf_dbg.c b/tools/bpf/bpf_dbg.c
index a0ebcdf..a07dfc4 100644
--- a/tools/bpf/bpf_dbg.c
+++ b/tools/bpf/bpf_dbg.c
@@ -890,7 +890,7 @@ static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len,
bool stop = false;
int i = 1;
- while (bpf_curr.Rs == false && stop == false) {
+ while (!bpf_curr.Rs && !stop) {
bpf_safe_regs();
if (i++ == next)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bpf: Simplify bool comparison
2021-02-08 9:43 [PATCH] bpf: Simplify bool comparison Jiapeng Chong
@ 2021-02-09 2:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-09 2:00 UTC (permalink / raw)
To: Jiapeng Chong
Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh, netdev, bpf, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Mon, 8 Feb 2021 17:43:36 +0800 you wrote:
> Fix the following coccicheck warning:
>
> ./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>
> [...]
Here is the summary with links:
- bpf: Simplify bool comparison
https://git.kernel.org/bpf/bpf-next/c/0a1b0fd929a8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-09 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 9:43 [PATCH] bpf: Simplify bool comparison Jiapeng Chong
2021-02-09 2:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).