From: kernel test robot <lkp@intel.com>
To: "Thomas Hellström " <thomas.hellstrom@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Matthew Brost <matthew.brost@intel.com>
Subject: drivers/gpu/drm/xe/xe_svm.c:1615:48-51: ERROR: Missing resource_size with res
Date: Fri, 06 Nov 2026 05:41:38 +0100 [thread overview]
Message-ID: <202611060555.alPmrU8P-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f66469d9905b39d2c260a15d7d6db450f4db67c1
commit: 8a52f4d9b1efc90eb338b0d59912e640400b9c63 drm/xe: Use the drm_pagemap cache and shrinker
date: 11 months ago
config: loongarch-randconfig-r2105-20261104 (https://download.01.org/0day-ci/archive/20261106/202611060555.alPmrU8P-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project e2e3d6c39cfebec9eace23629a5a103df2c79ba6)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 8a52f4d9b1ef ("drm/xe: Use the drm_pagemap cache and shrinker")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611060555.alPmrU8P-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/xe/xe_svm.c:1615:48-51: ERROR: Missing resource_size with res
vim +1615 drivers/gpu/drm/xe/xe_svm.c
1563
1564 /**
1565 * xe_pagemap_create() - Create a struct xe_pagemap object
1566 * @xe: The xe device.
1567 * @vr: Back-pointer to the struct xe_vram_region.
1568 *
1569 * Allocate and initialize a struct xe_pagemap. On successful
1570 * return, drm_pagemap_put() on the embedded struct drm_pagemap
1571 * should be used to unreference.
1572 *
1573 * Return: Pointer to a struct xe_pagemap if successful. Error pointer
1574 * on failure.
1575 */
1576 static struct xe_pagemap *xe_pagemap_create(struct xe_device *xe, struct xe_vram_region *vr)
1577 {
1578 struct device *dev = xe->drm.dev;
1579 struct xe_pagemap *xpagemap;
1580 struct dev_pagemap *pagemap;
1581 struct drm_pagemap *dpagemap;
1582 struct resource *res;
1583 void *addr;
1584 int err;
1585
1586 xpagemap = kzalloc(sizeof(*xpagemap), GFP_KERNEL);
1587 if (!xpagemap)
1588 return ERR_PTR(-ENOMEM);
1589
1590 pagemap = &xpagemap->pagemap;
1591 dpagemap = &xpagemap->dpagemap;
1592 INIT_WORK(&xpagemap->destroy_work, xe_pagemap_destroy_work);
1593 xpagemap->vr = vr;
1594
1595 err = drm_pagemap_init(dpagemap, pagemap, &xe->drm, &xe_drm_pagemap_ops);
1596 if (err)
1597 goto out_no_dpagemap;
1598
1599 res = devm_request_free_mem_region(dev, &iomem_resource,
1600 vr->usable_size);
1601 if (IS_ERR(res)) {
1602 err = PTR_ERR(res);
1603 goto out_err;
1604 }
1605
1606 pagemap->type = MEMORY_DEVICE_PRIVATE;
1607 pagemap->range.start = res->start;
1608 pagemap->range.end = res->end;
1609 pagemap->nr_range = 1;
1610 pagemap->owner = xe_svm_devm_owner(xe);
1611 pagemap->ops = drm_pagemap_pagemap_ops_get();
1612 addr = devm_memremap_pages(dev, pagemap);
1613 if (IS_ERR(addr)) {
1614 err = PTR_ERR(addr);
> 1615 devm_release_mem_region(dev, res->start, res->end - res->start + 1);
1616 goto out_err;
1617 }
1618 xpagemap->hpa_base = res->start;
1619 return xpagemap;
1620
1621 out_err:
1622 drm_pagemap_put(dpagemap);
1623 return ERR_PTR(err);
1624
1625 out_no_dpagemap:
1626 kfree(xpagemap);
1627 return ERR_PTR(err);
1628 }
1629
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-06 4:42 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=202611060555.alPmrU8P-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=thomas.hellstrom@linux.intel.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 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.