tree:
https://android.googlesource.com/kernel/common android12-5.10
head: cf236c272d7f78ea744808012e3689489facfcbc
commit: e7be908f88dbde1df94db83d6c7a23b117de0f36 [1/2] ANDROID: staging: add debug-kinfo
driver
config: i386-randconfig-s032-20210607 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout e7be908f88dbde1df94db83d6c7a23b117de0f36
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
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 >>)
> drivers/staging/android/debug_kinfo.c:64:30: sparse: sparse:
Using plain integer as NULL pointer
vim +64 drivers/staging/android/debug_kinfo.c
57
58 static int build_info_set(const char *str, const struct kernel_param *kp)
59 {
60 struct kernel_all_info *all_info;
61 size_t build_info_size;
62 int ret = 0;
63
64 if (all_info_addr == 0 || all_info_size == 0) {
65 ret = -EPERM;
66 goto Exit;
67 }
68
69 all_info = (struct kernel_all_info *)all_info_addr;
70 build_info_size = sizeof(all_info->info.build_info);
71
72 memcpy(&all_info->info.build_info, str, min(build_info_size - 1,
strlen(str)));
73 update_kernel_all_info(all_info);
74
75 if (strlen(str) > build_info_size) {
76 pr_warn("%s: Build info buffer (len: %zd) can't hold entire string
'%s'\n",
77 __func__, build_info_size, str);
78 ret = -ENOMEM;
79 }
80
81 Exit:
82 vunmap(all_info_addr);
83 return ret;
84 }
85
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org