All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 11806/11956] kernel/trace/bpf_trace.c:1181:23: warning: Uninitialized variable: t
@ 2020-09-30  2:58 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-30  2:58 UTC (permalink / raw)
  To: kbuild-all

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-30  2:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30  2:58 [linux-next:master 11806/11956] kernel/trace/bpf_trace.c:1181:23: warning: Uninitialized variable: t kernel test robot

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.