From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3948339479164617630==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [android-common:android12-5.10 7325/13830] kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment (different address spaces) Date: Sun, 12 Dec 2021 12:13:43 +0800 Message-ID: <202112121232.EcEv8ckj-lkp@intel.com> List-Id: --===============3948339479164617630== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://android.googlesource.com/kernel/common android12-5.10 head: 2d6a43c0364d3bb0c5c00b0a32b27f4c7740e004 commit: cc6eed90a467a413b9c62fdd76e8f06347266a88 [7325/13830] ANDROID: vend= or_hooks: Allow multiple attachments to restricted hooks config: x86_64-randconfig-s021-20211207 (https://download.01.org/0day-ci/ar= chive/20211212/202112121232.EcEv8ckj-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty git remote add android-common https://android.googlesource.com/kern= el/common git fetch --no-tags android-common android12-5.10 git checkout cc6eed90a467a413b9c62fdd76e8f06347266a88 # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> kernel/tracepoint.c:683:27: sparse: sparse: incorrect type in assignment= (different address spaces) @@ expected struct tracepoint_func [noderef= ] __rcu *funcs @@ got void * @@ kernel/tracepoint.c:683:27: sparse: expected struct tracepoint_func = [noderef] __rcu *funcs kernel/tracepoint.c:683:27: sparse: got void * >> kernel/tracepoint.c:692:25: sparse: sparse: cast removes address space '= __rcu' of expression >> kernel/tracepoint.c:714:38: sparse: sparse: incorrect type in argument 2= (different address spaces) @@ expected struct tracepoint_func *tp_func= s @@ got struct tracepoint_func [noderef] __rcu *funcs @@ kernel/tracepoint.c:714:38: sparse: expected struct tracepoint_func = *tp_funcs kernel/tracepoint.c:714:38: sparse: got struct tracepoint_func [node= ref] __rcu *funcs >> kernel/tracepoint.c:689:31: sparse: sparse: dereference of noderef expre= ssion kernel/tracepoint.c:691:42: sparse: sparse: dereference of noderef expre= ssion vim +683 kernel/tracepoint.c 675 = 676 #define ANDROID_RVH_NR_PROBES_MAX 2 677 static int rvh_func_add(struct tracepoint *tp, struct tracepoint_fun= c *func) 678 { 679 int i; 680 = 681 if (!static_key_enabled(&tp->key)) { 682 /* '+ 1' for the last NULL element */ > 683 tp->funcs =3D rvh_zalloc_funcs(ANDROID_RVH_NR_PROBES_MAX + 1); 684 if (!tp->funcs) 685 return ENOMEM; 686 } 687 = 688 for (i =3D 0; i < ANDROID_RVH_NR_PROBES_MAX; i++) { > 689 if (!tp->funcs[i].func) { 690 if (!static_key_enabled(&tp->key)) 691 tp->funcs[i].data =3D func->data; > 692 WRITE_ONCE(tp->funcs[i].func, func->func); 693 = 694 return 0; 695 } 696 } 697 = 698 return -EBUSY; 699 } 700 = 701 static int android_rvh_add_func(struct tracepoint *tp, struct tracep= oint_func *func) 702 { 703 int ret; 704 = 705 if (tp->regfunc && !static_key_enabled(&tp->key)) { 706 ret =3D tp->regfunc(); 707 if (ret < 0) 708 return ret; 709 } 710 = 711 ret =3D rvh_func_add(tp, func); 712 if (ret) 713 return ret; > 714 tracepoint_update_call(tp, tp->funcs, false); 715 static_key_enable(&tp->key); 716 = 717 return 0; 718 } 719 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3948339479164617630==--