public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	Florian Westphal <fw@strlen.de>, <llvm@lists.linux.dev>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>
Subject: Re: net/netfilter/nf_bpf_link.c:186:33: warning: bitwise operation between different enumeration types ('enum bpf_reg_type' and 'enum bpf_type_flag')
Date: Fri, 1 Mar 2024 20:44:00 +0800	[thread overview]
Message-ID: <ZeHNj//1o7R8BMx6@rli9-mobl> (raw)
In-Reply-To: <20240301035059.GA577965@dev-arch.thelio-3990X>

On Thu, Feb 29, 2024 at 08:50:59PM -0700, Nathan Chancellor wrote:
> Hi all,
> 
> On Fri, Mar 01, 2024 at 08:57:56AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   87adedeba51a822533649b143232418b9e26d08b
> > commit: fd9c663b9ad67dedfc9a3fd3429ddd3e83782b4d bpf: minimal support for programs hooked into netfilter framework
> > date:   10 months ago
> > config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240301/202403010842.hhJY5TFK-lkp@intel.com/config)
> > compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240301/202403010842.hhJY5TFK-lkp@intel.com/reproduce)
> > 
> > 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/202403010842.hhJY5TFK-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> 
> <snip>
> 
> While this change may introduce an instance of this warning, it is
> actually a change on the clang side that causes this and I am still
> looking for input on what to do about it:
> 
> https://github.com/ClangBuiltLinux/linux/issues/2002
> 
> I think this report can just be ignored for now. The Intel folks may
> want to consider sending -Wenum-enum-conversion and
> -Wenum-compare-conditional reports to our mailing list only until we can

Got it Nathan, we have updated the bot to send these 2 types reports
to the mailing list only.

> sort this out. Sorry for the noise.
> 
> Cheers,
> Nathan
> 
> > >> net/netfilter/nf_bpf_link.c:186:33: warning: bitwise operation between different enumeration types ('enum bpf_reg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
> >      186 |         info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;
> >          |                          ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
> >    22 warnings generated.
> > 
> > 
> > vim +186 net/netfilter/nf_bpf_link.c
> > 
> >    170	
> >    171	static bool nf_ptr_to_btf_id(struct bpf_insn_access_aux *info, const char *name)
> >    172	{
> >    173		struct btf *btf;
> >    174		s32 type_id;
> >    175	
> >    176		btf = bpf_get_btf_vmlinux();
> >    177		if (IS_ERR_OR_NULL(btf))
> >    178			return false;
> >    179	
> >    180		type_id = btf_find_by_name_kind(btf, name, BTF_KIND_STRUCT);
> >    181		if (WARN_ON_ONCE(type_id < 0))
> >    182			return false;
> >    183	
> >    184		info->btf = btf;
> >    185		info->btf_id = type_id;
> >  > 186		info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;
> >    187		return true;
> >    188	}
> >    189	
> > 
> > -- 
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
> > 
> 

  reply	other threads:[~2024-03-01 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  0:57 net/netfilter/nf_bpf_link.c:186:33: warning: bitwise operation between different enumeration types ('enum bpf_reg_type' and 'enum bpf_type_flag') kernel test robot
2024-03-01  3:50 ` Nathan Chancellor
2024-03-01 12:44   ` Philip Li [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-02  4:38 kernel test robot

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=ZeHNj//1o7R8BMx6@rli9-mobl \
    --to=philip.li@intel.com \
    --cc=ast@kernel.org \
    --cc=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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