All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jens.wiklander:testing/tuxbuild 2/9] drivers/tee/tee_shm_pool.c:17:20: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Sat, 17 Apr 2021 04:17:18 +0800	[thread overview]
Message-ID: <202104170414.FrH5NXmK-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]

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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26820 bytes --]

                 reply	other threads:[~2021-04-16 20:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202104170414.FrH5NXmK-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.