mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Inki Dae <inki.dae@samsung.com>
Subject: drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Tue, 7 Jul 2020 00:55:25 +0800	[thread overview]
Message-ID: <202007070021.oEMEATVk%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258
commit: 9940d9d93406f41ad4dc69fa2cda1e059a7ca108 drm/exynos: gem: Get rid of the internal 'pages' array
date:   7 weeks ago
config: arm64-randconfig-s032-20200706 (attached as .config)
compiler: aarch64-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.2-14-g8fce3d7a-dirty
        git checkout 9940d9d93406f41ad4dc69fa2cda1e059a7ca108
        # 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=arm64 

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/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] <asn:2> *kvaddr @@     got void *cookie @@
>> drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse:     expected void [noderef] <asn:2> *kvaddr
>> drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse:     got void *cookie

vim +62 drivers/gpu/drm/exynos/exynos_drm_gem.c

    19	
    20	static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem, bool kvmap)
    21	{
    22		struct drm_device *dev = exynos_gem->base.dev;
    23		unsigned long attr = 0;
    24	
    25		if (exynos_gem->dma_addr) {
    26			DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "already allocated.\n");
    27			return 0;
    28		}
    29	
    30		/*
    31		 * if EXYNOS_BO_CONTIG, fully physically contiguous memory
    32		 * region will be allocated else physically contiguous
    33		 * as possible.
    34		 */
    35		if (!(exynos_gem->flags & EXYNOS_BO_NONCONTIG))
    36			attr |= DMA_ATTR_FORCE_CONTIGUOUS;
    37	
    38		/*
    39		 * if EXYNOS_BO_WC or EXYNOS_BO_NONCACHABLE, writecombine mapping
    40		 * else cachable mapping.
    41		 */
    42		if (exynos_gem->flags & EXYNOS_BO_WC ||
    43				!(exynos_gem->flags & EXYNOS_BO_CACHABLE))
    44			attr |= DMA_ATTR_WRITE_COMBINE;
    45		else
    46			attr |= DMA_ATTR_NON_CONSISTENT;
    47	
    48		/* FBDev emulation requires kernel mapping */
    49		if (!kvmap)
    50			attr |= DMA_ATTR_NO_KERNEL_MAPPING;
    51	
    52		exynos_gem->dma_attrs = attr;
    53		exynos_gem->cookie = dma_alloc_attrs(to_dma_dev(dev), exynos_gem->size,
    54						     &exynos_gem->dma_addr, GFP_KERNEL,
    55						     exynos_gem->dma_attrs);
    56		if (!exynos_gem->cookie) {
    57			DRM_DEV_ERROR(to_dma_dev(dev), "failed to allocate buffer.\n");
    58			return -ENOMEM;
    59		}
    60	
    61		if (kvmap)
  > 62			exynos_gem->kvaddr = exynos_gem->cookie;
    63	
    64		DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "dma_addr(0x%lx), size(0x%lx)\n",
    65				(unsigned long)exynos_gem->dma_addr, exynos_gem->size);
    66		return 0;
    67	}
    68	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2020-07-06 17:24 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=202007070021.oEMEATVk%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=inki.dae@samsung.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®