mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shahab Vahedi <shahab@synopsys.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-snps-arc@lists.infradead.org,
	Alexei Starovoitov <ast@kernel.org>
Subject: arch/arc/net/bpf_jit_core.c:170:47-52: WARNING: conversion to bool not needed here
Date: Thu, 23 May 2024 20:38:08 +0800	[thread overview]
Message-ID: <202405232036.Xqoc3b0J-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c760b3725e52403dc1b28644fb09c47a83cacea6
commit: f122668ddcce450c2585f0be4bf4478d6fd6176b ARC: Add eBPF JIT support
date:   11 days ago
config: arc-randconfig-r062-20240523 (https://download.01.org/0day-ci/archive/20240523/202405232036.Xqoc3b0J-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405232036.Xqoc3b0J-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/arc/net/bpf_jit_core.c:170:47-52: WARNING: conversion to bool not needed here
--
>> arch/arc/net/bpf_jit_core.c:162:16-22: ERROR: application of sizeof to pointer
--
>> arch/arc/net/bpf_jit_core.c:586:5-8: Unneeded variable: "ret". Return "0" on line 638

vim +170 arch/arc/net/bpf_jit_core.c

   158	
   159	/* Initialise the context so there's no garbage. */
   160	static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)
   161	{
 > 162		memset(ctx, 0, sizeof(ctx));
   163	
   164		ctx->orig_prog = prog;
   165	
   166		/* If constant blinding was requested but failed, scram. */
   167		ctx->prog = bpf_jit_blind_constants(prog);
   168		if (IS_ERR(ctx->prog))
   169			return PTR_ERR(ctx->prog);
 > 170		ctx->blinded = (ctx->prog == ctx->orig_prog ? false : true);
   171	
   172		/* If the verifier doesn't zero-extend, then we have to do it. */
   173		ctx->do_zext = !ctx->prog->aux->verifier_zext;
   174	
   175		ctx->is_extra_pass = ctx->prog->jited;
   176		ctx->user_bpf_prog = ctx->prog->is_func;
   177	
   178		return 0;
   179	}
   180	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-05-23 12:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202405232036.Xqoc3b0J-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shahab@synopsys.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

all inboxes | Powered by JetHome®