All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, Alex Deucher <alexander.deucher@amd.com>
Subject: [agd5f:amd-staging-drm-next 1160/3178] drivers/gpu/drm/panthor/panthor_gem.c:1554:9: error: too many arguments to function 'drm_gem_lru_init'; expected 1, have 2
Date: Tue, 22 Sep 2026 20:33:57 +0800	[thread overview]
Message-ID: <202609222039.4UmWq3Ec-lkp@intel.com> (raw)

Hi Alex,

FYI, the error/warning still remains.

tree:   https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head:   e0e9c2257911b291ef5345635a9e6dfef5b2b424
commit: 03ad9467e6567c258264a72fd5ef4694e7995149 [1160/3178] Merge tag 'v7.1-rc6' into amd-staging-drm-next
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20260922/202609222039.4UmWq3Ec-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260922/202609222039.4UmWq3Ec-lkp@intel.com/reproduce)

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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609222039.4UmWq3Ec-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/panthor/panthor_gem.c:1500:35: error: passing argument 4 of 'drm_gem_lru_scan' from incompatible pointer type [-Wincompatible-pointer-types]
    1500 |                                   panthor_gem_try_evict_no_resv_wait, NULL);
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *) {aka _Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)}
   include/drm/drm_gem.h:618:33: note: expected 'long unsigned int *' but argument is of type 'bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)' {aka '_Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)'}
     618 |                  unsigned long *remaining,
         |                  ~~~~~~~~~~~~~~~^~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1389:13: note: 'panthor_gem_try_evict_no_resv_wait' declared here
    1389 | static bool panthor_gem_try_evict_no_resv_wait(struct drm_gem_object *obj,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1498:18: error: too few arguments to function 'drm_gem_lru_scan'; expected 6, have 5
    1498 |         freed += drm_gem_lru_scan(&ptdev->reclaim.unused,
         |                  ^~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:615:1: note: declared here
     615 | drm_gem_lru_scan(struct drm_device *dev,
         | ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1504:35: error: passing argument 1 of 'drm_gem_lru_scan' from incompatible pointer type [-Wincompatible-pointer-types]
    1504 |         freed += drm_gem_lru_scan(&ptdev->reclaim.mmapped,
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   struct drm_gem_lru *
   include/drm/drm_gem.h:615:37: note: expected 'struct drm_device *' but argument is of type 'struct drm_gem_lru *'
     615 | drm_gem_lru_scan(struct drm_device *dev,
         |                  ~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/panthor/panthor_gem.c:1505:50: error: passing argument 2 of 'drm_gem_lru_scan' makes pointer from integer without a cast [-Wint-conversion]
    1505 |                                   sc->nr_to_scan - freed, &remaining,
         |                                   ~~~~~~~~~~~~~~~^~~~~~~
         |                                                  |
         |                                                  long unsigned int
   include/drm/drm_gem.h:616:38: note: expected 'struct drm_gem_lru *' but argument is of type 'long unsigned int'
     616 |                  struct drm_gem_lru *lru,
         |                  ~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/panthor/panthor_gem.c:1505:59: error: passing argument 3 of 'drm_gem_lru_scan' makes integer from pointer without a cast [-Wint-conversion]
    1505 |                                   sc->nr_to_scan - freed, &remaining,
         |                                                           ^~~~~~~~~~
         |                                                           |
         |                                                           long unsigned int *
   include/drm/drm_gem.h:617:31: note: expected 'unsigned int' but argument is of type 'long unsigned int *'
     617 |                  unsigned int nr_to_scan,
         |                  ~~~~~~~~~~~~~^~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1506:35: error: passing argument 4 of 'drm_gem_lru_scan' from incompatible pointer type [-Wincompatible-pointer-types]
    1506 |                                   panthor_gem_try_evict_no_resv_wait, NULL);
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *) {aka _Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)}
   include/drm/drm_gem.h:618:33: note: expected 'long unsigned int *' but argument is of type 'bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)' {aka '_Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)'}
     618 |                  unsigned long *remaining,
         |                  ~~~~~~~~~~~~~~~^~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1389:13: note: 'panthor_gem_try_evict_no_resv_wait' declared here
    1389 | static bool panthor_gem_try_evict_no_resv_wait(struct drm_gem_object *obj,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1504:18: error: too few arguments to function 'drm_gem_lru_scan'; expected 6, have 5
    1504 |         freed += drm_gem_lru_scan(&ptdev->reclaim.mmapped,
         |                  ^~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:615:1: note: declared here
     615 | drm_gem_lru_scan(struct drm_device *dev,
         | ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1518:35: error: passing argument 1 of 'drm_gem_lru_scan' from incompatible pointer type [-Wincompatible-pointer-types]
    1518 |         freed += drm_gem_lru_scan(&ptdev->reclaim.gpu_mapped_shared,
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   struct drm_gem_lru *
   include/drm/drm_gem.h:615:37: note: expected 'struct drm_device *' but argument is of type 'struct drm_gem_lru *'
     615 | drm_gem_lru_scan(struct drm_device *dev,
         |                  ~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/panthor/panthor_gem.c:1519:50: error: passing argument 2 of 'drm_gem_lru_scan' makes pointer from integer without a cast [-Wint-conversion]
    1519 |                                   sc->nr_to_scan - freed, &remaining,
         |                                   ~~~~~~~~~~~~~~~^~~~~~~
         |                                                  |
         |                                                  long unsigned int
   include/drm/drm_gem.h:616:38: note: expected 'struct drm_gem_lru *' but argument is of type 'long unsigned int'
     616 |                  struct drm_gem_lru *lru,
         |                  ~~~~~~~~~~~~~~~~~~~~^~~
   drivers/gpu/drm/panthor/panthor_gem.c:1519:59: error: passing argument 3 of 'drm_gem_lru_scan' makes integer from pointer without a cast [-Wint-conversion]
    1519 |                                   sc->nr_to_scan - freed, &remaining,
         |                                                           ^~~~~~~~~~
         |                                                           |
         |                                                           long unsigned int *
   include/drm/drm_gem.h:617:31: note: expected 'unsigned int' but argument is of type 'long unsigned int *'
     617 |                  unsigned int nr_to_scan,
         |                  ~~~~~~~~~~~~~^~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1520:35: error: passing argument 4 of 'drm_gem_lru_scan' from incompatible pointer type [-Wincompatible-pointer-types]
    1520 |                                   panthor_gem_try_evict, NULL);
         |                                   ^~~~~~~~~~~~~~~~~~~~~
         |                                   |
         |                                   bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *) {aka _Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)}
   include/drm/drm_gem.h:618:33: note: expected 'long unsigned int *' but argument is of type 'bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)' {aka '_Bool (*)(struct drm_gem_object *, struct ww_acquire_ctx *)'}
     618 |                  unsigned long *remaining,
         |                  ~~~~~~~~~~~~~~~^~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1476:13: note: 'panthor_gem_try_evict' declared here
    1476 | static bool panthor_gem_try_evict(struct drm_gem_object *obj,
         |             ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1518:18: error: too few arguments to function 'drm_gem_lru_scan'; expected 6, have 5
    1518 |         freed += drm_gem_lru_scan(&ptdev->reclaim.gpu_mapped_shared,
         |                  ^~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:615:1: note: declared here
     615 | drm_gem_lru_scan(struct drm_device *dev,
         | ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c: In function 'panthor_gem_shrinker_init':
>> drivers/gpu/drm/panthor/panthor_gem.c:1554:9: error: too many arguments to function 'drm_gem_lru_init'; expected 1, have 2
    1554 |         drm_gem_lru_init(&ptdev->reclaim.unused, &ptdev->reclaim.lock);
         |         ^~~~~~~~~~~~~~~~                         ~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:610:6: note: declared here
     610 | void drm_gem_lru_init(struct drm_gem_lru *lru);
         |      ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1555:9: error: too many arguments to function 'drm_gem_lru_init'; expected 1, have 2
    1555 |         drm_gem_lru_init(&ptdev->reclaim.mmapped, &ptdev->reclaim.lock);
         |         ^~~~~~~~~~~~~~~~                          ~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:610:6: note: declared here
     610 | void drm_gem_lru_init(struct drm_gem_lru *lru);
         |      ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/panthor/panthor_gem.c:1556:9: error: too many arguments to function 'drm_gem_lru_init'; expected 1, have 2
    1556 |         drm_gem_lru_init(&ptdev->reclaim.gpu_mapped_shared, &ptdev->reclaim.lock);
         |         ^~~~~~~~~~~~~~~~                                    ~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:610:6: note: declared here
     610 | void drm_gem_lru_init(struct drm_gem_lru *lru);
         |      ^~~~~~~~~~~~~~~~


vim +/drm_gem_lru_init +1554 drivers/gpu/drm/panthor/panthor_gem.c

fb42964e2a76f6 Akash Goel      2026-04-01  1543  
fb42964e2a76f6 Akash Goel      2026-04-01  1544  int panthor_gem_shrinker_init(struct panthor_device *ptdev)
fb42964e2a76f6 Akash Goel      2026-04-01  1545  {
fb42964e2a76f6 Akash Goel      2026-04-01  1546  	struct shrinker *shrinker;
fb42964e2a76f6 Akash Goel      2026-04-01  1547  	int ret;
fb42964e2a76f6 Akash Goel      2026-04-01  1548  
fb42964e2a76f6 Akash Goel      2026-04-01  1549  	ret = drmm_mutex_init(&ptdev->base, &ptdev->reclaim.lock);
fb42964e2a76f6 Akash Goel      2026-04-01  1550  	if (ret)
fb42964e2a76f6 Akash Goel      2026-04-01  1551  		return ret;
fb42964e2a76f6 Akash Goel      2026-04-01  1552  
fb42964e2a76f6 Akash Goel      2026-04-01  1553  	INIT_LIST_HEAD(&ptdev->reclaim.vms);
fb42964e2a76f6 Akash Goel      2026-04-01 @1554  	drm_gem_lru_init(&ptdev->reclaim.unused, &ptdev->reclaim.lock);
fb42964e2a76f6 Akash Goel      2026-04-01  1555  	drm_gem_lru_init(&ptdev->reclaim.mmapped, &ptdev->reclaim.lock);
fb42964e2a76f6 Akash Goel      2026-04-01  1556  	drm_gem_lru_init(&ptdev->reclaim.gpu_mapped_shared, &ptdev->reclaim.lock);
fb42964e2a76f6 Akash Goel      2026-04-01  1557  	ptdev->reclaim.gpu_mapped_count = 0;
fb42964e2a76f6 Akash Goel      2026-04-01  1558  
fb42964e2a76f6 Akash Goel      2026-04-01  1559  	/* Teach lockdep about lock ordering wrt. shrinker: */
fb42964e2a76f6 Akash Goel      2026-04-01  1560  	fs_reclaim_acquire(GFP_KERNEL);
fb42964e2a76f6 Akash Goel      2026-04-01  1561  	might_lock(&ptdev->reclaim.lock);
fb42964e2a76f6 Akash Goel      2026-04-01  1562  	fs_reclaim_release(GFP_KERNEL);
fb42964e2a76f6 Akash Goel      2026-04-01  1563  
fb42964e2a76f6 Akash Goel      2026-04-01  1564  	shrinker = shrinker_alloc(0, "drm-panthor-gem");
fb42964e2a76f6 Akash Goel      2026-04-01  1565  	if (!shrinker)
fb42964e2a76f6 Akash Goel      2026-04-01  1566  		return -ENOMEM;
fb42964e2a76f6 Akash Goel      2026-04-01  1567  
fb42964e2a76f6 Akash Goel      2026-04-01  1568  	shrinker->count_objects = panthor_gem_shrinker_count;
fb42964e2a76f6 Akash Goel      2026-04-01  1569  	shrinker->scan_objects = panthor_gem_shrinker_scan;
fb42964e2a76f6 Akash Goel      2026-04-01  1570  	shrinker->private_data = ptdev;
fb42964e2a76f6 Akash Goel      2026-04-01  1571  	ptdev->reclaim.shrinker = shrinker;
fb42964e2a76f6 Akash Goel      2026-04-01  1572  
fb42964e2a76f6 Akash Goel      2026-04-01  1573  	shrinker_register(shrinker);
e06177ec7a3639 Boris Brezillon 2025-12-08  1574  	return 0;
e06177ec7a3639 Boris Brezillon 2025-12-08  1575  }
e06177ec7a3639 Boris Brezillon 2025-12-08  1576  

:::::: The code at line 1554 was first introduced by commit
:::::: fb42964e2a76f68a5fb581d382b5d2be2d5bda9b drm/panthor: Add a GEM shrinker

:::::: TO: Akash Goel <akash.goel@arm.com>
:::::: CC: Boris Brezillon <boris.brezillon@collabora.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-09-22 12:34 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=202609222039.4UmWq3Ec-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.