From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [android-common:android12-5.10 1/2] drivers/staging/android/debug_kinfo.c:64:30: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 02 Feb 2021 21:33:10 +0800 [thread overview]
Message-ID: <202102022106.rb3HoAIk-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]
tree: https://android.googlesource.com/kernel/common android12-5.10
head: cf236c272d7f78ea744808012e3689489facfcbc
commit: e7be908f88dbde1df94db83d6c7a23b117de0f36 [1/2] ANDROID: staging: add debug-kinfo driver
config: arm-randconfig-s031-20210202 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31061 bytes --]
next reply other threads:[~2021-02-02 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 13:33 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-08 1:13 [android-common:android12-5.10 1/2] drivers/staging/android/debug_kinfo.c:64:30: sparse: sparse: Using plain integer as NULL pointer 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=202102022106.rb3HoAIk-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.