All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lorenzo Stoakes <ljs@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [ljs:project/cow-context 7/18] mm/cow_context.c:425:30: sparse: sparse: cast to non-scalar
Date: Thu, 07 May 2026 19:06:42 +0800	[thread overview]
Message-ID: <202605071913.7YeveUhZ-lkp@intel.com> (raw)

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

             reply	other threads:[~2026-05-07 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 11:06 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=202605071913.7YeveUhZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ljs@kernel.org \
    --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.