* [ljs:project/cow-context 7/18] mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar
@ 2026-05-07 11:06 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-07 11:06 UTC (permalink / raw)
To: Lorenzo Stoakes; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ljs/linux.git project/cow-context
head: e02aa02fef8128743869032cb20d26f752cd9154
commit: 53591da634daa5ce534050b281052ab69defff58 [7/18] mm: add cow context write-side functionality
config: alpha-randconfig-r134-20260507 (https://download.01.org/0day-ci/archive/20260507/202605071913.7YeveUhZ-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.4.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260507/202605071913.7YeveUhZ-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/202605071913.7YeveUhZ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar
mm/cow_context.c:702:23: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *entry @@ got struct list_head [noderef] * @@
mm/cow_context.c:702:23: sparse: expected struct list_head *entry
mm/cow_context.c:702:23: sparse: got struct list_head [noderef] *
mm/cow_context.c:717:17: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head const *head @@ got struct list_head [noderef] * @@
mm/cow_context.c:717:17: sparse: expected struct list_head const *head
mm/cow_context.c:717:17: sparse: got struct list_head [noderef] *
mm/cow_context.c:739:23: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *new @@ got struct list_head [noderef] * @@
mm/cow_context.c:739:23: sparse: expected struct list_head *new
mm/cow_context.c:739:23: sparse: got struct list_head [noderef] *
mm/cow_context.c:739:43: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected struct list_head *head @@ got struct list_head [noderef] * @@
mm/cow_context.c:739:43: sparse: expected struct list_head *head
mm/cow_context.c:739:43: sparse: got struct list_head [noderef] *
mm/cow_context.c:752:25: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *list @@ got struct list_head [noderef] * @@
mm/cow_context.c:752:25: sparse: expected struct list_head *list
mm/cow_context.c:752:25: sparse: got struct list_head [noderef] *
mm/cow_context.c:753:25: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *list @@ got struct list_head [noderef] * @@
mm/cow_context.c:753:25: sparse: expected struct list_head *list
mm/cow_context.c:753:25: sparse: got struct list_head [noderef] *
vim +425 mm/cow_context.c
393
394 /*
395 * Reduce the count of remaps by 1, freeing the entry in the remaps maple tree
396 * if reduced to zero.
397 *
398 * RCU read lock must be held.
399 */
400 static void shrink_remaps(struct cow_context *context,
401 struct ma_state *mas_remaps, pgoff_t pgoff,
402 pgoff_t pgoff_last, remaps_entry_t remaps)
403 {
404 int nr;
405 remaps_entry_t new_remaps;
406 pgoff_t pgoff_next;
407
408 lockdep_assert_in_rcu_read_lock();
409
410 /* mmap_downgrade() makes life hard. */
411 spin_lock(&context->concurrent_unmap_lock);
412
413 nr = nr_remaps(remaps);
414
415 /* If multi, simple. */
416 if (nr > 2) {
417 dynarray_shrink(get_multi_remaps(remaps));
418 spin_unlock(&context->concurrent_unmap_lock);
419 return;
420 }
421
422 if (nr == 2)
423 new_remaps = mk_simple_remap(get_remap(remaps, 0));
424 else /* nr == 1 */
> 425 new_remaps = EMPTY_REMAPS_ENTRY;
426
427 pgoff_next = mas_remaps->last + 1;
428
429 spin_unlock(&context->concurrent_unmap_lock);
430 /* Now we're allocating so must drop the lock. RCU readers are safe. */
431 rcu_read_unlock();
432 store_new_remaps_entry(mas_remaps, pgoff, pgoff_last, new_remaps);
433 free_remaps(remaps);
434 mas_set(mas_remaps, pgoff_next);
435 rcu_read_lock();
436 }
437
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ljs:project/cow-context 7/18] mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar
@ 2026-05-07 16:37 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-07 16:37 UTC (permalink / raw)
To: Lorenzo Stoakes; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ljs/linux.git project/cow-context
head: e02aa02fef8128743869032cb20d26f752cd9154
commit: 53591da634daa5ce534050b281052ab69defff58 [7/18] mm: add cow context write-side functionality
config: alpha-randconfig-r134-20260507 (https://download.01.org/0day-ci/archive/20260508/202605080029.AH4jHUVC-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.4.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260508/202605080029.AH4jHUVC-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/202605080029.AH4jHUVC-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar
mm/cow_context.c:702:23: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *entry @@ got struct list_head [noderef] * @@
mm/cow_context.c:702:23: sparse: expected struct list_head *entry
mm/cow_context.c:702:23: sparse: got struct list_head [noderef] *
mm/cow_context.c:717:17: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head const *head @@ got struct list_head [noderef] * @@
mm/cow_context.c:717:17: sparse: expected struct list_head const *head
mm/cow_context.c:717:17: sparse: got struct list_head [noderef] *
mm/cow_context.c:739:23: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *new @@ got struct list_head [noderef] * @@
mm/cow_context.c:739:23: sparse: expected struct list_head *new
mm/cow_context.c:739:23: sparse: got struct list_head [noderef] *
mm/cow_context.c:739:43: sparse: sparse: incorrect type in argument 2 (different modifiers) @@ expected struct list_head *head @@ got struct list_head [noderef] * @@
mm/cow_context.c:739:43: sparse: expected struct list_head *head
mm/cow_context.c:739:43: sparse: got struct list_head [noderef] *
mm/cow_context.c:752:25: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *list @@ got struct list_head [noderef] * @@
mm/cow_context.c:752:25: sparse: expected struct list_head *list
mm/cow_context.c:752:25: sparse: got struct list_head [noderef] *
mm/cow_context.c:753:25: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct list_head *list @@ got struct list_head [noderef] * @@
mm/cow_context.c:753:25: sparse: expected struct list_head *list
mm/cow_context.c:753:25: sparse: got struct list_head [noderef] *
vim +425 mm/cow_context.c
393
394 /*
395 * Reduce the count of remaps by 1, freeing the entry in the remaps maple tree
396 * if reduced to zero.
397 *
398 * RCU read lock must be held.
399 */
400 static void shrink_remaps(struct cow_context *context,
401 struct ma_state *mas_remaps, pgoff_t pgoff,
402 pgoff_t pgoff_last, remaps_entry_t remaps)
403 {
404 int nr;
405 remaps_entry_t new_remaps;
406 pgoff_t pgoff_next;
407
408 lockdep_assert_in_rcu_read_lock();
409
410 /* mmap_downgrade() makes life hard. */
411 spin_lock(&context->concurrent_unmap_lock);
412
413 nr = nr_remaps(remaps);
414
415 /* If multi, simple. */
416 if (nr > 2) {
417 dynarray_shrink(get_multi_remaps(remaps));
418 spin_unlock(&context->concurrent_unmap_lock);
419 return;
420 }
421
422 if (nr == 2)
423 new_remaps = mk_simple_remap(get_remap(remaps, 0));
424 else /* nr == 1 */
> 425 new_remaps = EMPTY_REMAPS_ENTRY;
426
427 pgoff_next = mas_remaps->last + 1;
428
429 spin_unlock(&context->concurrent_unmap_lock);
430 /* Now we're allocating so must drop the lock. RCU readers are safe. */
431 rcu_read_unlock();
432 store_new_remaps_entry(mas_remaps, pgoff, pgoff_last, new_remaps);
433 free_remaps(remaps);
434 mas_set(mas_remaps, pgoff_next);
435 rcu_read_lock();
436 }
437
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-07 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 16:37 [ljs:project/cow-context 7/18] mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-05-07 11:06 kernel test robot
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.