llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [brauner-github:vfs-6.18.iomap 1/1] fs/iomap/direct-io.c:281:29: error: call to undeclared function 'largest_zero_folio'; ISO C99 and later do not support implicit function declarations
@ 2025-08-15 16:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-15 16:28 UTC (permalink / raw)
  To: Pankaj Raghav
  Cc: llvm, oe-kbuild-all, Christian Brauner, Christian Brauner,
	Darrick J. Wong

tree:   https://github.com/brauner/linux.git vfs-6.18.iomap
head:   5589673e8d8d31ff2cec82181676c510e5afdb8d
commit: 5589673e8d8d31ff2cec82181676c510e5afdb8d [1/1] iomap: use largest_zero_folio() in iomap_dio_zero()
config: hexagon-randconfig-001-20250815 (https://download.01.org/0day-ci/archive/20250816/202508160053.vMCqzF47-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250816/202508160053.vMCqzF47-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/202508160053.vMCqzF47-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/iomap/direct-io.c:281:29: error: call to undeclared function 'largest_zero_folio'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     281 |         struct folio *zero_folio = largest_zero_folio();
         |                                    ^
   fs/iomap/direct-io.c:281:29: note: did you mean 'is_zero_folio'?
   include/linux/mm.h:1926:20: note: 'is_zero_folio' declared here
    1926 | static inline bool is_zero_folio(const struct folio *folio)
         |                    ^
>> fs/iomap/direct-io.c:281:16: error: incompatible integer to pointer conversion initializing 'struct folio *' with an expression of type 'int' [-Wint-conversion]
     281 |         struct folio *zero_folio = largest_zero_folio();
         |                       ^            ~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/largest_zero_folio +281 fs/iomap/direct-io.c

   275	
   276	static int iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio,
   277			loff_t pos, unsigned len)
   278	{
   279		struct inode *inode = file_inode(dio->iocb->ki_filp);
   280		struct bio *bio;
 > 281		struct folio *zero_folio = largest_zero_folio();
   282		int nr_vecs = max(1, i_blocksize(inode) / folio_size(zero_folio));
   283	
   284		if (!len)
   285			return 0;
   286	
   287		/*
   288		 * This limit shall never be reached as most filesystems have a
   289		 * maximum blocksize of 64k.
   290		 */
   291		if (WARN_ON_ONCE(nr_vecs > BIO_MAX_VECS))
   292			return -EINVAL;
   293	
   294		bio = iomap_dio_alloc_bio(iter, dio, nr_vecs,
   295					  REQ_OP_WRITE | REQ_SYNC | REQ_IDLE);
   296		fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits,
   297					  GFP_KERNEL);
   298		bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos);
   299		bio->bi_private = dio;
   300		bio->bi_end_io = iomap_dio_bio_end_io;
   301	
   302		while (len > 0) {
   303			unsigned int io_len = min(len, folio_size(zero_folio));
   304	
   305			bio_add_folio_nofail(bio, zero_folio, io_len, 0);
   306			len -= io_len;
   307		}
   308		iomap_dio_submit_bio(iter, dio, bio, pos);
   309	
   310		return 0;
   311	}
   312	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-15 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 16:28 [brauner-github:vfs-6.18.iomap 1/1] fs/iomap/direct-io.c:281:29: error: call to undeclared function 'largest_zero_folio'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).