llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pankaj Raghav <p.raghav@samsung.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Christian Brauner <christianvanbrauner@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>
Subject: [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
Date: Sat, 16 Aug 2025 00:28:00 +0800	[thread overview]
Message-ID: <202508160053.vMCqzF47-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-08-15 16:28 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=202508160053.vMCqzF47-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=djwong@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=p.raghav@samsung.com \
    /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 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).