tree:
https://git.linaro.org/people/jens.wiklander/linux-tee.git testing/tuxbuild
head: 64b34f1f528483a323edea85a568a5edd5c5995f
commit: 563d58a2fc7eb34648cd7b57e30b15dfc03677e5 [2/9] tee: simplify shm pool handling
config: sparc64-randconfig-s032-20210416 (attached as .config)
compiler: sparc64-linux-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-280-g2cd6d34e-dirty
git remote add jens.wiklander
https://git.linaro.org/people/jens.wiklander/linux-tee.git
git fetch --no-tags jens.wiklander testing/tuxbuild
git checkout 563d58a2fc7eb34648cd7b57e30b15dfc03677e5
# 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__' W=1 ARCH=sparc64
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/tee/tee_shm_pool.c:17:20: sparse: sparse: incompatible
types in comparison expression (different type sizes):
> drivers/tee/tee_shm_pool.c:17:20: sparse: unsigned long *
> drivers/tee/tee_shm_pool.c:17:20: sparse: unsigned int *
vim +17 drivers/tee/tee_shm_pool.c
11
12 static int pool_op_gen_alloc(struct tee_shm_pool_mgr *poolm,
13 struct tee_shm *shm, size_t size, size_t align)
14 {
15 unsigned long va;
16 struct gen_pool *genpool = poolm->private_data;
17 size_t a = max(align, 1U << genpool->min_alloc_order);
18 struct genpool_data_align data = { .align = a };
19 size_t s = roundup(size, a);
20
21 va = gen_pool_alloc_algo(genpool, s, gen_pool_first_fit_align, &data);
22 if (!va)
23 return -ENOMEM;
24
25 memset((void *)va, 0, s);
26 shm->kaddr = (void *)va;
27 shm->paddr = gen_pool_virt_to_phys(genpool, va);
28 shm->size = s;
29 /*
30 * This is from a static shared memory pool so no need to register
31 * each chunk, and no need to unregister later either.
32 */
33 shm->flags &= ~TEE_SHM_REGISTER;
34 return 0;
35 }
36
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org