All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 11806/11956] kernel/trace/bpf_trace.c:1181:23: warning: Uninitialized variable: t
Date: Wed, 30 Sep 2020 10:58:12 +0800	[thread overview]
Message-ID: <202009301009.3dkEVaCB-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   49e7e3e905e437a02782019570f70997e2da9101
commit: c4d0bfb45068d853a478b9067a95969b1886a30f [11806/11956] bpf: Add bpf_snprintf_btf helper
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


vim +1181 kernel/trace/bpf_trace.c

  1153	
  1154	#define BTF_F_ALL	(BTF_F_COMPACT  | BTF_F_NONAME | \
  1155				 BTF_F_PTR_RAW | BTF_F_ZERO)
  1156	
  1157	static int bpf_btf_printf_prepare(struct btf_ptr *ptr, u32 btf_ptr_size,
  1158					  u64 flags, const struct btf **btf,
  1159					  s32 *btf_id)
  1160	{
  1161		const struct btf_type *t;
  1162	
  1163		if (unlikely(flags & ~(BTF_F_ALL)))
  1164			return -EINVAL;
  1165	
  1166		if (btf_ptr_size != sizeof(struct btf_ptr))
  1167			return -EINVAL;
  1168	
  1169		*btf = bpf_get_btf_vmlinux();
  1170	
  1171		if (IS_ERR_OR_NULL(*btf))
  1172			return PTR_ERR(*btf);
  1173	
  1174		if (ptr->type_id > 0)
  1175			*btf_id = ptr->type_id;
  1176		else
  1177			return -EINVAL;
  1178	
  1179		if (*btf_id > 0)
  1180			t = btf_type_by_id(*btf, *btf_id);
> 1181		if (*btf_id <= 0 || !t)
  1182			return -ENOENT;
  1183	
  1184		return 0;
  1185	}
  1186	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2020-09-30  2:58 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=202009301009.3dkEVaCB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.