Hi Alan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url:
https://github.com/0day-ci/linux/commits/Alan-Maguire/bpf-add-helpers-to-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-s021-20200917 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> kernel/bpf/btf.c:2465:17: sparse: sparse: Using plain integer as
NULL pointer
kernel/bpf/btf.c:2467:17: sparse: sparse: Using plain integer as
NULL pointer
kernel/bpf/btf.c:3244:17: sparse: sparse: Using plain integer as NULL pointer
kernel/bpf/btf.c:3585:9: sparse: sparse: Using plain integer as NULL pointer
> kernel/bpf/btf.c:5310:6: sparse: sparse: symbol
'btf_type_show' was not declared. Should it be static?
Please review and possibly fold the followup patch.
#
https://github.com/0day-ci/linux/commit/a85186d405b24251bfd7179ae1949f345...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Alan-Maguire/bpf-add-helpers-to-support-BTF-based-kernel-data-display/20200918-213932
git checkout a85186d405b24251bfd7179ae1949f3458e9702d
vim +2465 kernel/bpf/btf.c
2452
2453 static void btf_ptr_show(const struct btf *btf, const struct btf_type *t,
2454 u32 type_id, void *data, u8 bits_offset,
2455 struct btf_show *show)
2456 {
2457 void *safe_data;
2458
2459 safe_data = btf_show_start_type(show, t, type_id, data);
2460 if (!safe_data)
2461 return;
2462
2463 /* It is a hashed value unless BTF_SHOW_PTR_RAW is specified */
2464 if (show->flags & BTF_SHOW_PTR_RAW)
2465 btf_show_type_value(show, "0x%px", *(void
**)safe_data);
2466 else
2467 btf_show_type_value(show, "0x%p", *(void **)safe_data);
2468 btf_show_end_type(show);
2469 }
2470
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org