All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chao Yu <chao@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [chao:feature/cache 2/13] fs/f2fs/cache.c:182:30: sparse: sparse: incorrect type in initializer (different base types)
Date: Wed, 19 Aug 2026 13:01:28 +0800	[thread overview]
Message-ID: <202608191224.eWjE9na5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git feature/cache
head:   cc6a23d8c232f588f3a5415d1b10a19e1e4ce860
commit: 79680d7892699e4a580d6dc3831820056989cd75 [2/13] f2fs: cache: implement metadata cache
config: sparc64-randconfig-r112-20260819 (https://download.01.org/0day-ci/archive/20260819/202608191224.eWjE9na5-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/202608191224.eWjE9na5-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/202608191224.eWjE9na5-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/f2fs/cache.c:182:30: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int flags @@     got restricted gfp_t @@
   fs/f2fs/cache.c:182:30: sparse:     expected unsigned int flags
   fs/f2fs/cache.c:182:30: sparse:     got restricted gfp_t
>> fs/f2fs/cache.c:185:23: sparse: sparse: invalid assignment: |=
   fs/f2fs/cache.c:185:23: sparse:    left side has type unsigned int
   fs/f2fs/cache.c:185:23: sparse:    right side has type restricted gfp_t
>> fs/f2fs/cache.c:187:17: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted gfp_t [usertype] flags @@     got unsigned int flags @@
   fs/f2fs/cache.c:187:17: sparse:     expected restricted gfp_t [usertype] flags
   fs/f2fs/cache.c:187:17: sparse:     got unsigned int flags
>> fs/f2fs/cache.c:187:17: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted gfp_t [usertype] flags @@     got unsigned int flags @@
   fs/f2fs/cache.c:187:17: sparse:     expected restricted gfp_t [usertype] flags
   fs/f2fs/cache.c:187:17: sparse:     got unsigned int flags
>> fs/f2fs/cache.c:187:17: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted gfp_t [usertype] flags @@     got unsigned int flags @@
   fs/f2fs/cache.c:187:17: sparse:     expected restricted gfp_t [usertype] flags
   fs/f2fs/cache.c:187:17: sparse:     got unsigned int flags
>> fs/f2fs/cache.c:191:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned int flags @@
   fs/f2fs/cache.c:191:17: sparse:     expected restricted gfp_t [usertype] gfp
   fs/f2fs/cache.c:191:17: sparse:     got unsigned int flags
>> fs/f2fs/cache.c:191:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned int flags @@
   fs/f2fs/cache.c:191:17: sparse:     expected restricted gfp_t [usertype] gfp
   fs/f2fs/cache.c:191:17: sparse:     got unsigned int flags
>> fs/f2fs/cache.c:191:17: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned int flags @@
   fs/f2fs/cache.c:191:17: sparse:     expected restricted gfp_t [usertype] gfp
   fs/f2fs/cache.c:191:17: sparse:     got unsigned int flags

vim +182 fs/f2fs/cache.c

   175	
   176	static struct f2fs_cached_block *f2fs_create_cache(
   177			struct f2fs_cached_block_list *cache,
   178			unsigned long index, bool nofail)
   179	{
   180		struct f2fs_cached_block *entry;
   181		struct folio *folio;
 > 182		unsigned int flags = GFP_NOFS;
   183	
   184		if (nofail)
 > 185			flags |= __GFP_NOFAIL;
   186	
 > 187		entry = kzalloc(sizeof(*entry), flags);
   188		if (!entry)
   189			return ERR_PTR(-ENOMEM);
   190	
 > 191		folio = folio_alloc(flags, 0);
   192		if (!folio) {
   193			kfree(entry);
   194			return ERR_PTR(-ENOMEM);
   195		}
   196	
   197		entry->data = folio_address(folio);
   198		entry->index = index;
   199	
   200		atomic_set(&entry->refcount, 0);
   201		entry->next_entry = NULL;
   202		INIT_LIST_HEAD(&entry->list);
   203	
   204		entry->cache = cache;
   205	
   206		return entry;
   207	}
   208	

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

                 reply	other threads:[~2026-08-19  5:02 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=202608191224.eWjE9na5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chao@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.