Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dhowells-fs:ceph-iter 19/43] net/ceph/databuf.c:143:9: error: call to undeclared function 'alloc_pages_bulk_array'; ISO C99 and later do not support implicit function declarations
Date: Thu, 30 Jan 2025 00:08:28 +0800	[thread overview]
Message-ID: <202501300024.GpUfBI0f-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git ceph-iter
head:   99bca1b95b54b7a3e7260c2431b587639482a71d
commit: e4e0cb58c2b8c5d15293762a5dcc81d1de627c42 [19/43] libceph: Add a new data container type, ceph_databuf
config: s390-randconfig-002-20250129 (https://download.01.org/0day-ci/archive/20250130/202501300024.GpUfBI0f-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250130/202501300024.GpUfBI0f-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/202501300024.GpUfBI0f-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/ceph/databuf.c:143:9: error: call to undeclared function 'alloc_pages_bulk_array'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     143 |                 got = alloc_pages_bulk_array(gfp, want, pages);
         |                       ^
   net/ceph/databuf.c:143:9: note: did you mean 'alloc_pages_bulk_noprof'?
   include/linux/gfp.h:213:15: note: 'alloc_pages_bulk_noprof' declared here
     213 | unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid,
         |               ^
   1 error generated.


vim +/alloc_pages_bulk_array +143 net/ceph/databuf.c

   118	
   119	/* Allocate enough pages for a dbuf to append the given amount
   120	 * of dbuf without allocating.
   121	 * Returns: 0 on success, -ENOMEM on error.
   122	 */
   123	int ceph_databuf_reserve(struct ceph_databuf *dbuf, size_t add_space,
   124				 gfp_t gfp)
   125	{
   126		struct bio_vec *bvec;
   127		size_t i, req_bvec = DIV_ROUND_UP(dbuf->iter.count + add_space, PAGE_SIZE);
   128		int ret;
   129	
   130		dbuf->put_pages = true;
   131		if (req_bvec > dbuf->max_bvec) {
   132			ret = ceph_databuf_expand(dbuf, req_bvec, gfp);
   133			if (ret < 0)
   134				return ret;
   135		}
   136	
   137		bvec = dbuf->bvec;
   138		while (dbuf->nr_bvec < req_bvec) {
   139			struct page *pages[16];
   140			size_t want = min(req_bvec, ARRAY_SIZE(pages)), got;
   141	
   142			memset(pages, 0, sizeof(pages));
 > 143			got = alloc_pages_bulk_array(gfp, want, pages);
   144			if (!got)
   145				return -ENOMEM;
   146			for (i = 0; i < got; i++)
   147				bvec_set_page(&bvec[dbuf->nr_bvec + i], pages[i],
   148					      PAGE_SIZE, 0);
   149			dbuf->iter.nr_segs += got;
   150			dbuf->nr_bvec += got;
   151			dbuf->limit = dbuf->nr_bvec * PAGE_SIZE;
   152		}
   153	
   154		return 0;
   155	}
   156	EXPORT_SYMBOL(ceph_databuf_reserve);
   157	

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

                 reply	other threads:[~2025-01-29 16:09 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=202501300024.GpUfBI0f-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dhowells@redhat.com \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox